Skip to content

chore: migrate to @tanstack/store 0.9.1#6691

Merged
Sheraff merged 4 commits intomainfrom
codex/store-0.9.1-migration
Feb 19, 2026
Merged

chore: migrate to @tanstack/store 0.9.1#6691
Sheraff merged 4 commits intomainfrom
codex/store-0.9.1-migration

Conversation

@Sheraff
Copy link
Contributor

@Sheraff Sheraff commented Feb 17, 2026

Summary

  • bump TanStack store packages to 0.9.1 in router-core/react-router/solid-router/vue-router
  • migrate router-core store usage to the 0.9.1 Store API
  • replace direct state mutation and constructor onUpdate usage with subscribe + setState flow
  • update lockfile entries for TanStack store 0.9.1 packages

Summary by CodeRabbit

  • Chores

    • Updated underlying store dependencies to ^0.9.1 for React, Solid, and Vue router packages.
  • Bug Fixes

    • Redirected routes are no longer kept in route caches, preventing stale redirect entries.
  • Refactor

    • Improved router state initialization and update flows for more consistent routing behavior; added tests to ensure cache hygiene.

fixes #6703

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

Walkthrough

Updated TanStack store dependencies across router packages and changed router-core to prune status: 'redirected' entries from cachedMatches and to initialize/update the Store via setState instead of previous in-place/onUpdate mutations.

Changes

Cohort / File(s) Summary
TanStack Store Dependencies
packages/react-router/package.json, packages/router-core/package.json, packages/solid-router/package.json, packages/vue-router/package.json
Bumped @tanstack/*-store dependencies from ^0.8.0^0.9.1.
Router core logic & tests
packages/router-core/src/router.ts, packages/router-core/tests/load.test.ts
Added filterRedirectedCachedMatches to remove status: 'redirected' entries from cachedMatches; replaced some direct in-place store mutations with setState initialization/updates; updated commit/update logic to prune redirected matches; tests added/assertions ensuring redirected matches are removed.

Sequence Diagram(s)

sequenceDiagram
  participant Client as Client
  participant Router as RouterCore
  participant Store as Store
  rect rgba(200,230,201,0.5)
    Client->>Router: navigate / preload / updateMatch
    Router->>Store: read current state
    Router->>Router: compute commits & exitingMatches
    Router->>Router: filterRedirectedCachedMatches(cachedMatches)
    Router->>Store: setState(updated state with filtered cachedMatches)
    Store-->>Router: state updated
    Router-->>Client: navigation result / rendered matches
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • birkskyum

Poem

🐰 I hopped through branches, nose so spry,

I nudged the redirects — let them fly,
I taught the store to set, not shove,
Now cached matches skip and rove,
A joyful hop — clean paths, more love 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: upgrading TanStack store packages from 0.8.0 to 0.9.1 across multiple packages and migrating the API usage.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/store-0.9.1-migration

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

@nx-cloud
Copy link

nx-cloud bot commented Feb 17, 2026

View your CI Pipeline Execution ↗ for commit 1d5a870

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 54s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-18 20:37:20 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 17, 2026

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@6691

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@6691

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@6691

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@6691

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@6691

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@6691

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@6691

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@6691

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@6691

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@6691

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@6691

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@6691

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@6691

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@6691

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@6691

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@6691

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@6691

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@6691

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@6691

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@6691

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@6691

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@6691

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@6691

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@6691

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@6691

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@6691

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-fn-stubs@6691

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@6691

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@6691

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@6691

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@6691

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@6691

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@6691

@tanstack/vue-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router@6691

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router-devtools@6691

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router-ssr-query@6691

@tanstack/vue-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-start@6691

@tanstack/vue-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-start-client@6691

@tanstack/vue-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-start-server@6691

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@6691

commit: 1d5a870

@Sheraff Sheraff merged commit c3ad063 into main Feb 19, 2026
7 of 8 checks passed
@Sheraff Sheraff deleted the codex/store-0.9.1-migration branch February 19, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TanStack Start 1.161.1 + react-store 0.9.1 causes “Cannot set property state of #<Store> which has only a getter”

3 participants

Comments