From 04cf5d16129ea3ed4ccb8bba135c10dc2ebedea3 Mon Sep 17 00:00:00 2001 From: Sheraff Date: Wed, 25 Feb 2026 08:25:16 +0100 Subject: [PATCH] fix(router-core): tanstack/store v0.9 requires createStore instead of new Store --- packages/router-core/src/router.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/router-core/src/router.ts b/packages/router-core/src/router.ts index 9e91db43d1e..0eeb87425fe 100644 --- a/packages/router-core/src/router.ts +++ b/packages/router-core/src/router.ts @@ -1,4 +1,4 @@ -import { Store } from '@tanstack/store' +import { createStore } from '@tanstack/store' import { createBrowserHistory, parseHref } from '@tanstack/history' import { isServer } from '@tanstack/router-core/isServer' import { batch } from './utils/batch' @@ -42,6 +42,7 @@ import { executeRewriteOutput, rewriteBasepath, } from './rewrite' +import type { Store } from '@tanstack/store' import type { LRUCache } from './lru-cache' import type { ProcessRouteTreeResult, @@ -1132,7 +1133,7 @@ export class RouterCore< getInitialRouterState(this.latestLocation), ) as unknown as Store } else { - this.__store = new Store(getInitialRouterState(this.latestLocation)) + this.__store = createStore(getInitialRouterState(this.latestLocation)) setupScrollRestoration(this) }