@tanstack/react-router 1.0.5 → 1.0.7

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.
@@ -1093,6 +1093,9 @@
1093
1093
  });
1094
1094
  }
1095
1095
 
1096
+ const useTransition = React__namespace.useTransition || (() => [false, cb => {
1097
+ cb();
1098
+ }]);
1096
1099
  exports.routerContext = /*#__PURE__*/React__namespace.createContext(null);
1097
1100
  if (typeof document !== 'undefined') {
1098
1101
  if (window.__TSR_ROUTER_CONTEXT__) {
@@ -1129,7 +1132,7 @@
1129
1132
  const routerState = useRouterState({
1130
1133
  select: s => pick(s, ['isLoading', 'location', 'resolvedLocation', 'isTransitioning'])
1131
1134
  });
1132
- const [isTransitioning, startReactTransition] = React__namespace.useTransition();
1135
+ const [isTransitioning, startReactTransition] = useTransition();
1133
1136
  router.startReactTransition = startReactTransition;
1134
1137
  React__namespace.useEffect(() => {
1135
1138
  if (isTransitioning) {
@@ -1179,7 +1182,7 @@
1179
1182
  };
1180
1183
  }, [router.history]);
1181
1184
  useLayoutEffect$1(() => {
1182
- if (routerState.isTransitioning && !isTransitioning && !routerState.isLoading && routerState.resolvedLocation !== routerState.location) {
1185
+ if (React__namespace.useTransition ? routerState.isTransitioning && !isTransitioning : !routerState.isLoading && routerState.resolvedLocation !== routerState.location) {
1183
1186
  router.emit({
1184
1187
  type: 'onResolved',
1185
1188
  fromLocation: routerState.resolvedLocation,