@tanstack/react-router 1.100.0 → 1.101.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/route.cjs.map +1 -1
- package/dist/cjs/route.d.cts +1 -0
- package/dist/cjs/router.cjs +11 -2
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/route.d.ts +1 -0
- package/dist/esm/route.js.map +1 -1
- package/dist/esm/router.js +11 -2
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/route.ts +9 -0
- package/src/router.ts +13 -5
package/package.json
CHANGED
package/src/route.ts
CHANGED
|
@@ -466,6 +466,15 @@ export interface UpdatableRouteOptions<
|
|
|
466
466
|
meta?: AnyRouteMatch['meta']
|
|
467
467
|
}
|
|
468
468
|
ssr?: boolean
|
|
469
|
+
codeSplitGroupings?: Array<
|
|
470
|
+
Array<
|
|
471
|
+
| 'loader'
|
|
472
|
+
| 'component'
|
|
473
|
+
| 'pendingComponent'
|
|
474
|
+
| 'notFoundComponent'
|
|
475
|
+
| 'errorComponent'
|
|
476
|
+
>
|
|
477
|
+
>
|
|
469
478
|
}
|
|
470
479
|
|
|
471
480
|
export type RouteLoaderFn<
|
package/src/router.ts
CHANGED
|
@@ -1744,13 +1744,21 @@ export class Router<
|
|
|
1744
1744
|
...next
|
|
1745
1745
|
}: ParsedLocation & CommitLocationOptions): Promise<void> => {
|
|
1746
1746
|
const isSameState = () => {
|
|
1747
|
-
//
|
|
1748
|
-
// temporarily add the previous
|
|
1747
|
+
// the following props are ignored but may still be provided when navigating,
|
|
1748
|
+
// temporarily add the previous values to the next state so they don't affect
|
|
1749
1749
|
// the comparison
|
|
1750
|
-
|
|
1751
|
-
|
|
1750
|
+
const ignoredProps = [
|
|
1751
|
+
'key',
|
|
1752
|
+
'__TSR_index',
|
|
1753
|
+
'__hashScrollIntoViewOptions',
|
|
1754
|
+
] as const
|
|
1755
|
+
ignoredProps.forEach((prop) => {
|
|
1756
|
+
;(next.state as any)[prop] = this.latestLocation.state[prop]
|
|
1757
|
+
})
|
|
1752
1758
|
const isEqual = deepEqual(next.state, this.latestLocation.state)
|
|
1753
|
-
|
|
1759
|
+
ignoredProps.forEach((prop) => {
|
|
1760
|
+
delete next.state[prop]
|
|
1761
|
+
})
|
|
1754
1762
|
return isEqual
|
|
1755
1763
|
}
|
|
1756
1764
|
|