@tanstack/react-router 0.0.1-beta.237 → 0.0.1-beta.239
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/RouterProvider.js +3 -11
- package/build/cjs/RouterProvider.js.map +1 -1
- package/build/cjs/router.js +3 -1
- package/build/cjs/router.js.map +1 -1
- package/build/esm/index.js +6 -12
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +355 -355
- package/build/umd/index.development.js +6 -12
- 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/RouterProvider.tsx +10 -15
- package/src/router.ts +1 -1
|
@@ -1403,19 +1403,12 @@
|
|
|
1403
1403
|
});
|
|
1404
1404
|
const inner = /*#__PURE__*/React__namespace.createElement(routerContext.Provider, {
|
|
1405
1405
|
value: router
|
|
1406
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
1407
|
-
router: router
|
|
1408
|
-
}));
|
|
1406
|
+
}, /*#__PURE__*/React__namespace.createElement(Matches, null), /*#__PURE__*/React__namespace.createElement(Transitioner, null));
|
|
1409
1407
|
if (router.options.Wrap) {
|
|
1410
1408
|
return /*#__PURE__*/React__namespace.createElement(router.options.Wrap, null, inner);
|
|
1411
1409
|
}
|
|
1412
1410
|
return inner;
|
|
1413
1411
|
}
|
|
1414
|
-
function RouterProviderInner({
|
|
1415
|
-
router
|
|
1416
|
-
}) {
|
|
1417
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Matches, null), /*#__PURE__*/React__namespace.createElement(Transitioner, null));
|
|
1418
|
-
}
|
|
1419
1412
|
function Transitioner() {
|
|
1420
1413
|
const router = useRouter();
|
|
1421
1414
|
const routerState = useRouterState({
|
|
@@ -1471,8 +1464,7 @@
|
|
|
1471
1464
|
};
|
|
1472
1465
|
}, [router.history]);
|
|
1473
1466
|
useLayoutEffect$1(() => {
|
|
1474
|
-
if (!isTransitioning && !routerState.isLoading && routerState.resolvedLocation !== routerState.location) {
|
|
1475
|
-
console.log('onResolved', routerState.location);
|
|
1467
|
+
if (routerState.isTransitioning && !isTransitioning && !routerState.isLoading && routerState.resolvedLocation !== routerState.location) {
|
|
1476
1468
|
router.emit({
|
|
1477
1469
|
type: 'onResolved',
|
|
1478
1470
|
fromLocation: routerState.resolvedLocation,
|
|
@@ -1486,7 +1478,7 @@
|
|
|
1486
1478
|
resolvedLocation: s.location
|
|
1487
1479
|
}));
|
|
1488
1480
|
}
|
|
1489
|
-
}, [isTransitioning, routerState.isLoading]);
|
|
1481
|
+
}, [routerState.isTransitioning, isTransitioning, routerState.isLoading, routerState.resolvedLocation, routerState.location]);
|
|
1490
1482
|
useLayoutEffect$1(() => {
|
|
1491
1483
|
if (!window.__TSR_DEHYDRATED__) {
|
|
1492
1484
|
tryLoad();
|
|
@@ -2903,7 +2895,9 @@
|
|
|
2903
2895
|
isLoading: false,
|
|
2904
2896
|
isTransitioning: false,
|
|
2905
2897
|
status: 'idle',
|
|
2906
|
-
resolvedLocation:
|
|
2898
|
+
resolvedLocation: {
|
|
2899
|
+
...location
|
|
2900
|
+
},
|
|
2907
2901
|
location,
|
|
2908
2902
|
matches: [],
|
|
2909
2903
|
pendingMatches: [],
|