@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.
@@ -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 = router.latestLocation.state.key;
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
- const router = useRouter();
1242
- const locationKey = router.latestLocation.state?.key;
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,