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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # `react-router-dom-v5-compat`
2
2
 
3
+ ## 6.25.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - `react-router-dom@6.25.1`
9
+ - `react-router@6.25.1`
10
+
3
11
  ## 6.25.0
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router DOM v5 Compat v6.25.0
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
- v7_relativeSplatPath: router.future.v7_relativeSplatPath
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,