react-router 6.28.2 → 6.28.3-pre-v6.0

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,14 @@
1
1
  # `react-router`
2
2
 
3
+ ## 6.28.3-pre-v6.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Do not log v7 deprecation warnings in production builds ([#12794](https://github.com/remix-run/react-router/pull/12794))
8
+ - Optimize route matching by skipping redundant `matchRoutes` calls when possible ([#12169](https://github.com/remix-run/react-router/pull/12169))
9
+ - Updated dependencies:
10
+ - `@remix-run/router@1.21.2-pre-v6.0`
11
+
3
12
  ## 6.28.2
4
13
 
5
14
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router v6.28.2
2
+ * React Router v6.28.3-pre-v6.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -392,7 +392,7 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
392
392
  let segments = pathname.replace(/^\//, "").split("/");
393
393
  remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
394
394
  }
395
- let matches = matchRoutes(routes, {
395
+ let matches = dataRouterState && dataRouterState.matches && dataRouterState.matches.length > 0 ? dataRouterState.matches : matchRoutes(routes, {
396
396
  pathname: remainingPathname
397
397
  });
398
398
  if (process.env.NODE_ENV !== "production") {
@@ -930,7 +930,7 @@ function warningOnce(key, cond, message) {
930
930
 
931
931
  const alreadyWarned = {};
932
932
  function warnOnce(key, message) {
933
- if (!alreadyWarned[message]) {
933
+ if (process.env.NODE_ENV !== "production" && !alreadyWarned[message]) {
934
934
  alreadyWarned[message] = true;
935
935
  console.warn(message);
936
936
  }