@tanstack/react-router 0.0.1-beta.239 → 0.0.1-beta.240
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/build/cjs/Matches.js +3 -5
- package/build/cjs/Matches.js.map +1 -1
- package/build/esm/index.js +3 -5
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +353 -353
- package/build/umd/index.development.js +3 -5
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/Matches.tsx +2 -3
|
@@ -1202,7 +1202,7 @@
|
|
|
1202
1202
|
const router = useRouter();
|
|
1203
1203
|
const routerState = useRouterState();
|
|
1204
1204
|
const matches = routerState.pendingMatches?.some(d => d.showPending) ? routerState.pendingMatches : routerState.matches;
|
|
1205
|
-
const locationKey =
|
|
1205
|
+
const locationKey = routerState.resolvedLocation.state.key;
|
|
1206
1206
|
const route = router.routesById[rootRouteId];
|
|
1207
1207
|
const errorComponent = React__namespace.useCallback(props => {
|
|
1208
1208
|
return /*#__PURE__*/React__namespace.createElement(ErrorComponent, {
|
|
@@ -1238,10 +1238,8 @@
|
|
|
1238
1238
|
const match = matches[0];
|
|
1239
1239
|
const routeId = match?.routeId;
|
|
1240
1240
|
const route = routesById[routeId];
|
|
1241
|
-
|
|
1242
|
-
const locationKey =
|
|
1243
|
-
// const locationKey = useRouterState().location.state?.key
|
|
1244
|
-
|
|
1241
|
+
useRouter();
|
|
1242
|
+
const locationKey = useRouterState().resolvedLocation.state?.key;
|
|
1245
1243
|
const PendingComponent = route.options.pendingComponent ?? options.defaultPendingComponent;
|
|
1246
1244
|
const pendingElement = PendingComponent ? /*#__PURE__*/React__namespace.createElement(PendingComponent, {
|
|
1247
1245
|
useMatch: route.useMatch,
|