react-router 7.5.0 → 7.5.1-pre.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/development/{chunk-KNED5TY2.mjs → chunk-QP2GE2RJ.mjs} +586 -346
  3. package/dist/development/{future-ldDp5FKH.d.ts → data-CQbyyGzl.d.mts} +1 -11
  4. package/dist/{production/future-ldDp5FKH.d.mts → development/data-CQbyyGzl.d.ts} +1 -11
  5. package/dist/development/dom-export.d.mts +2 -2
  6. package/dist/development/dom-export.d.ts +2 -2
  7. package/dist/development/dom-export.js +479 -311
  8. package/dist/development/dom-export.mjs +18 -6
  9. package/dist/{production/fog-of-war-1hWhK5ey.d.mts → development/fog-of-war-CyHis97d.d.mts} +3 -2
  10. package/dist/development/{fog-of-war-oa9CGk10.d.ts → fog-of-war-D4x86-Xc.d.ts} +3 -2
  11. package/dist/development/index.d.mts +12 -8
  12. package/dist/development/index.d.ts +12 -8
  13. package/dist/development/index.js +587 -346
  14. package/dist/development/index.mjs +4 -2
  15. package/dist/development/lib/types/route-module.d.mts +2 -2
  16. package/dist/development/lib/types/route-module.d.ts +2 -2
  17. package/dist/development/lib/types/route-module.js +1 -1
  18. package/dist/development/lib/types/route-module.mjs +1 -1
  19. package/dist/development/{route-data-5OzAzQtT.d.mts → route-data-OcOrqK13.d.mts} +30 -7
  20. package/dist/{production/route-data-5OzAzQtT.d.mts → development/route-data-OcOrqK13.d.ts} +30 -7
  21. package/dist/production/{chunk-ZIM7OIE3.mjs → chunk-TOAG3JKW.mjs} +586 -346
  22. package/dist/production/{future-ldDp5FKH.d.ts → data-CQbyyGzl.d.mts} +1 -11
  23. package/dist/{development/future-ldDp5FKH.d.mts → production/data-CQbyyGzl.d.ts} +1 -11
  24. package/dist/production/dom-export.d.mts +2 -2
  25. package/dist/production/dom-export.d.ts +2 -2
  26. package/dist/production/dom-export.js +479 -311
  27. package/dist/production/dom-export.mjs +18 -6
  28. package/dist/{development/fog-of-war-1hWhK5ey.d.mts → production/fog-of-war-CyHis97d.d.mts} +3 -2
  29. package/dist/production/{fog-of-war-oa9CGk10.d.ts → fog-of-war-D4x86-Xc.d.ts} +3 -2
  30. package/dist/production/index.d.mts +12 -8
  31. package/dist/production/index.d.ts +12 -8
  32. package/dist/production/index.js +587 -346
  33. package/dist/production/index.mjs +4 -2
  34. package/dist/production/lib/types/route-module.d.mts +2 -2
  35. package/dist/production/lib/types/route-module.d.ts +2 -2
  36. package/dist/production/lib/types/route-module.js +1 -1
  37. package/dist/production/lib/types/route-module.mjs +1 -1
  38. package/dist/production/{route-data-5OzAzQtT.d.ts → route-data-OcOrqK13.d.mts} +30 -7
  39. package/dist/{development/route-data-5OzAzQtT.d.ts → production/route-data-OcOrqK13.d.ts} +30 -7
  40. package/package.json +1 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # `react-router`
2
2
 
3
+ ## 7.5.1-pre.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix single fetch bug where no revalidation request would be made when navigating upwards to a reused parent route ([#13253](https://github.com/remix-run/react-router/pull/13253))
8
+ - When using the object-based `route.lazy` API, the `HydrateFallback` and `hydrateFallbackElement` properties are now skipped when lazy loading routes after hydration. ([#13376](https://github.com/remix-run/react-router/pull/13376))
9
+
10
+ If you move the code for these properties into a separate file, you can use this optimization to avoid downloading unused hydration code. For example:
11
+
12
+ ```ts
13
+ createBrowserRouter([
14
+ {
15
+ path: "/show/:showId",
16
+ lazy: {
17
+ loader: async () => (await import("./show.loader.js")).loader,
18
+ Component: async () => (await import("./show.component.js")).Component,
19
+ HydrateFallback: async () =>
20
+ (await import("./show.hydrate-fallback.js")).HydrateFallback,
21
+ },
22
+ },
23
+ ]);
24
+ ```
25
+
26
+ - Properly revalidate prerendered paths when param values change ([#13380](https://github.com/remix-run/react-router/pull/13380))
27
+ - UNSTABLE: Add a new `unstable_runClientMiddleware` argument to `dataStrategy` to enable middleware execution in custom `dataStrategy` implementations ([#13395](https://github.com/remix-run/react-router/pull/13395))
28
+ - UNSTABLE: Add better error messaging when `getLoadContext` is not updated to return a `Map`" ([#13242](https://github.com/remix-run/react-router/pull/13242))
29
+ - Do not automatically add `null` to `staticHandler.query()` `context.loaderData` if routes do not have loaders ([#13223](https://github.com/remix-run/react-router/pull/13223))
30
+
31
+ - This was a Remix v2 implementation detail inadvertently left in for React Router v7
32
+ - Now that we allow returning `undefined` from loaders, our prior check of `loaderData[routeId] !== undefined` was no longer sufficient and was changed to a `routeId in loaderData` check - these `null` values can cause issues for this new check
33
+ - ⚠️ This could be a "breaking bug fix" for you if you are doing manual SSR with `createStaticHandler()`/`<StaticRouterProvider>`, and using `context.loaderData` to control `<RouterProvider>` hydration behavior on the client
34
+
35
+ - Fix prerendering when a loader returns a redirect ([#13365](https://github.com/remix-run/react-router/pull/13365))
36
+ - UNSTABLE: Update context type for `LoaderFunctionArgs`/`ActionFunctionArgs` when middleware is enabled ([#13381](https://github.com/remix-run/react-router/pull/13381))
37
+ - Add support for the new `unstable_shouldCallHandler`/`unstable_shouldRevalidateArgs` APIs in `dataStrategy` ([#13253](https://github.com/remix-run/react-router/pull/13253))
38
+
3
39
  ## 7.5.0
4
40
 
5
41
  ### Minor Changes