Skip to content

fix(deps): upgrade @tanstack/store to 0.10.0 and @tanstack/react-store to 0.10.0#2658

Open
nperez0111 wants to merge 1 commit intomainfrom
tanstack-store-upgrade-clean
Open

fix(deps): upgrade @tanstack/store to 0.10.0 and @tanstack/react-store to 0.10.0#2658
nperez0111 wants to merge 1 commit intomainfrom
tanstack-store-upgrade-clean

Conversation

@nperez0111
Copy link
Copy Markdown
Contributor

@nperez0111 nperez0111 commented Apr 18, 2026

Summary

  • Upgrades @tanstack/store from 0.7.7 to 0.10.0 and @tanstack/react-store from 0.7.7 to 0.10.0
  • Migrates all store.setState(value) calls to store.setState(() => value) (new API requires updater functions)
  • Replaces createStore(state, { onUpdate }) with createStore(state) + store.subscribe() (options parameter removed in 0.10)
  • Updates useStore usage in React hooks to always provide a selector function

Summary by CodeRabbit

Release Notes

  • Chores

    • Updated TanStack Store dependencies to version 0.10.0.
  • Refactor

    • Modernized state management patterns to align with latest dependency updates.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Error Error Apr 18, 2026 7:53am
blocknote-website Error Error Apr 18, 2026 7:53am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b987338e-edcd-4fb0-8605-a4436960855c

📥 Commits

Reviewing files that changed from the base of the PR and between 40ddec4 and 04cd48f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (17)
  • packages/core/package.json
  • packages/core/src/comments/extension.ts
  • packages/core/src/editor/BlockNoteExtension.ts
  • packages/core/src/extensions/Collaboration/ForkYDoc.ts
  • packages/core/src/extensions/FilePanel/FilePanel.ts
  • packages/core/src/extensions/FormattingToolbar/FormattingToolbar.ts
  • packages/core/src/extensions/ShowSelection/ShowSelection.ts
  • packages/core/src/extensions/SideMenu/SideMenu.ts
  • packages/core/src/extensions/SuggestionMenu/SuggestionMenu.ts
  • packages/core/src/extensions/TableHandles/TableHandles.ts
  • packages/react/package.json
  • packages/react/src/components/FormattingToolbar/DefaultButtons/AddCommentButton.tsx
  • packages/react/src/components/FormattingToolbar/DefaultButtons/CreateLinkButton.tsx
  • packages/react/src/components/FormattingToolbar/FormattingToolbarController.tsx
  • packages/react/src/hooks/useExtension.ts
  • packages/xl-ai/src/AIExtension.ts
  • packages/xl-ai/src/components/FormattingToolbar/AIToolbarButton.tsx

📝 Walkthrough

Walkthrough

Updated TanStack Store dependency from ^0.7.7/0.7.7 to ^0.10.0 across packages. Adapted codebase by removing options parameter from createStore, refactoring store lifecycle patterns to use mount() subscriptions instead of onUpdate hooks, and converting store.setState() calls to functional updater forms throughout extensions and components.

Changes

Cohort / File(s) Summary
Dependency Upgrade
packages/core/package.json, packages/react/package.json
Updated @tanstack/store and @tanstack/react-store versions from 0.7.7 to 0.10.0.
Store Initialization API
packages/core/src/editor/BlockNoteExtension.ts
Removed options?: StoreOptions<T> parameter from createStore function signature; now accepts only initialState: T.
Store Lifecycle Refactoring
packages/core/src/comments/extension.ts, packages/core/src/extensions/ShowSelection/ShowSelection.ts
Migrated from store-level onUpdate hooks to mount() lifecycle method with store.subscribe() for tracking state changes and issuing ProseMirror transactions; added proper subscription cleanup.
Functional State Updaters
packages/core/src/extensions/{Collaboration/ForkYDoc,FilePanel/FilePanel,FormattingToolbar/FormattingToolbar,SideMenu/SideMenu,SuggestionMenu/SuggestionMenu,TableHandles/TableHandles}.ts, packages/react/src/components/FormattingToolbar/DefaultButtons/{AddCommentButton,CreateLinkButton}.tsx, packages/react/src/components/FormattingToolbar/FormattingToolbarController.tsx, packages/react/src/hooks/useExtension.ts, packages/xl-ai/src/{AIExtension,components/FormattingToolbar/AIToolbarButton}.tsx
Converted store.setState() calls from direct object/value arguments to functional updater form setState(() => newState), deferring state computation until invocation. Updated type casting in useExtension.ts hook.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A fluffy update hops on through,
From Store point-seven to point-ten-point-zero!
Functional updaters now bloom and grow,
Lifecycle subscriptions steal the show,
Twitches whiskers The migrations all flow! 🌟

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides a clear summary of changes but lacks detailed rationale, impact analysis, testing information, and checklist items required by the repository template. Add sections for Rationale (why upgrade), Impact (breaking changes and migration details), Testing (verification of compatibility), and complete the Checklist to match the repository template.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: upgrading @tanstack/store and @tanstack/react-store to version 0.10.0, which is the primary focus of all code changes across the repository.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tanstack-store-upgrade-clean

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 18, 2026

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@2658

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@2658

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@2658

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@2658

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@2658

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@2658

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@2658

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@2658

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@2658

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@2658

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@2658

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@2658

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@2658

commit: 04cd48f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant