@tanstack/router-core 1.162.9 → 1.163.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/router.cjs +1 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +1 -1
- package/dist/esm/router.d.ts +1 -1
- package/dist/esm/router.js +2 -2
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +3 -2
package/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createStore } from '@tanstack/store'
|
|
2
2
|
import { createBrowserHistory, parseHref } from '@tanstack/history'
|
|
3
3
|
import { isServer } from '@tanstack/router-core/isServer'
|
|
4
4
|
import { batch } from './utils/batch'
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
executeRewriteOutput,
|
|
43
43
|
rewriteBasepath,
|
|
44
44
|
} from './rewrite'
|
|
45
|
+
import type { Store } from '@tanstack/store'
|
|
45
46
|
import type { LRUCache } from './lru-cache'
|
|
46
47
|
import type {
|
|
47
48
|
ProcessRouteTreeResult,
|
|
@@ -1132,7 +1133,7 @@ export class RouterCore<
|
|
|
1132
1133
|
getInitialRouterState(this.latestLocation),
|
|
1133
1134
|
) as unknown as Store<any>
|
|
1134
1135
|
} else {
|
|
1135
|
-
this.__store =
|
|
1136
|
+
this.__store = createStore(getInitialRouterState(this.latestLocation))
|
|
1136
1137
|
|
|
1137
1138
|
setupScrollRestoration(this)
|
|
1138
1139
|
}
|