react-router-dom-v5-compat 6.25.0 → 6.25.1
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/CHANGELOG.md +8 -0
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/umd/react-router-dom-v5-compat.development.js +9 -5
- package/dist/umd/react-router-dom-v5-compat.development.js.map +1 -1
- package/dist/umd/react-router-dom-v5-compat.production.min.js +2 -2
- package/dist/umd/react-router-dom-v5-compat.production.min.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React Router DOM v5 Compat v6.25.
|
|
2
|
+
* React Router DOM v5 Compat v6.25.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -572,6 +572,9 @@ function RouterProvider(_ref) {
|
|
|
572
572
|
static: false,
|
|
573
573
|
basename
|
|
574
574
|
}), [router, navigator, basename]);
|
|
575
|
+
let routerFuture = React.useMemo(() => ({
|
|
576
|
+
v7_relativeSplatPath: router.future.v7_relativeSplatPath
|
|
577
|
+
}), [router.future.v7_relativeSplatPath]);
|
|
575
578
|
// The fragment and {null} here are important! We need them to keep React 18's
|
|
576
579
|
// useId happy when we are server-rendering since we may have a <script> here
|
|
577
580
|
// containing the hydrated server-side staticContext (from StaticRouterProvider).
|
|
@@ -591,15 +594,15 @@ function RouterProvider(_ref) {
|
|
|
591
594
|
location: state.location,
|
|
592
595
|
navigationType: state.historyAction,
|
|
593
596
|
navigator: navigator,
|
|
594
|
-
future:
|
|
595
|
-
|
|
596
|
-
}
|
|
597
|
-
}, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/React.createElement(DataRoutes, {
|
|
597
|
+
future: routerFuture
|
|
598
|
+
}, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/React.createElement(MemoizedDataRoutes, {
|
|
598
599
|
routes: router.routes,
|
|
599
600
|
future: router.future,
|
|
600
601
|
state: state
|
|
601
602
|
}) : fallbackElement))))), null);
|
|
602
603
|
}
|
|
604
|
+
// Memoize to avoid re-renders when updating `ViewTransitionContext`
|
|
605
|
+
const MemoizedDataRoutes = /*#__PURE__*/React.memo(DataRoutes);
|
|
603
606
|
function DataRoutes(_ref3) {
|
|
604
607
|
let {
|
|
605
608
|
routes,
|