Update react-router monorepo to v7.9.5 #48
+45
−36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
7.9.1->7.9.57.9.1->7.9.57.9.1->7.9.5Release Notes
remix-run/react-router (@react-router/dev)
v7.9.5Compare Source
Patch Changes
prerender.unstable_concurrencyoption, to support running the prerendering concurrently, potentially speeding up the build. (#14380)/domexport. (#14457)linkelements used by dynamic imports (#14463)[email protected]@react-router/[email protected]@react-router/[email protected]v7.9.4Compare Source
Patch Changes
Update
valibotdependency to^1.1.0(#14379)New (unstable)
useRoutehook for accessing data from specific routes (#14407)For example, let's say you have an
adminroute somewhere in your app and you want any child routes ofadminto all have access to theloaderDataandactionDatafromadmin.You might even want to create a reusable widget that all of the routes nested under
admincould use:In framework mode,
useRouteknows all your app's routes and gives you TS errors when invalid route IDs are passed in:useRoutereturnsundefinedif the route is not part of the current page:Note: the
rootroute is the exception since it is guaranteed to be part of the current page.As a result,
useRoutenever returnsundefinedforroot.loaderDataandactionDataare marked as optional since they could be accessed before theactionis triggered or after theloaderthrew an error:If instead of a specific route, you wanted access to the current route's
loaderDataandactionData, you can calluseRoutewithout arguments:This usage is equivalent to calling
useLoaderDataanduseActionData, but consolidates all route data access into one hook:useRoute.Note: when calling
useRoute()(without a route ID), TS has no way to know which route is the current route.As a result,
loaderDataandactionDataare typed asunknown.If you want more type-safety, you can either narrow the type yourself with something like
zodor you can refactor your app to pass down typed props to yourAdminWidget:Updated dependencies:
[email protected]@react-router/[email protected]@react-router/[email protected]v7.9.3Compare Source
Patch Changes
[email protected]@react-router/[email protected]@react-router/[email protected]v7.9.2Compare Source
Patch Changes
Fix preset future flags being ignored during config resolution (#14369)
Fixes a bug where future flags defined by presets were completely ignored. The config resolution was incorrectly reading from
reactRouterUserConfig.futureinstead of the mergeduserAndPresetConfigs.future, causing all preset-defined future flags to be lost.This fix ensures presets can properly enable experimental features as intended by the preset system design.
Add unstable support for RSC Framework Mode (#14336)
Switch internal vite plugin Response logic to use
@remix-run/node-fetch-server(#13927)Updated dependencies:
[email protected]@react-router/[email protected]@react-router/[email protected]remix-run/react-router (@react-router/serve)
v7.9.5Compare Source
Patch Changes
[email protected]@react-router/[email protected]@react-router/[email protected]v7.9.4Compare Source
Patch Changes
[email protected]@react-router/[email protected]@react-router/[email protected]v7.9.3Compare Source
Patch Changes
[email protected]@react-router/[email protected]@react-router/[email protected]v7.9.2Compare Source
Patch Changes
[email protected]@react-router/[email protected]@react-router/[email protected]remix-run/react-router (react-router)
v7.9.5Compare Source
Patch Changes
Move RSCHydratedRouter and utils to
/domexport. (#14457)useRoute: return type-safe
handle(#14462)For example:
Ensure action handlers run for routes with middleware even if no loader is present (#14443)
Add
unstable_instrumentationsAPI to allow users to add observablity to their apps by instrumenting route loaders, actions, middlewares, lazy, as well as server-side request handlers and client side navigations/fetches (#14412)entry.server.tsx:export const unstable_instrumentations = [...]entry.client.tsx:<HydratedRouter unstable_instrumentations={[...]} />createBrowserRouter(routes, { unstable_instrumentations: [...] })This also adds a new
unstable_patternparameter to loaders/actions/middleware which contains the un-interpolated route pattern (i.e.,/blog/:slug) which is useful for aggregating performance metrics by routev7.9.4Compare Source
Patch Changes
handle external redirects in from server actions (#14400)
New (unstable)
useRoutehook for accessing data from specific routes (#14407)For example, let's say you have an
adminroute somewhere in your app and you want any child routes ofadminto all have access to theloaderDataandactionDatafromadmin.You might even want to create a reusable widget that all of the routes nested under
admincould use:In framework mode,
useRouteknows all your app's routes and gives you TS errors when invalid route IDs are passed in:useRoutereturnsundefinedif the route is not part of the current page:Note: the
rootroute is the exception since it is guaranteed to be part of the current page.As a result,
useRoutenever returnsundefinedforroot.loaderDataandactionDataare marked as optional since they could be accessed before theactionis triggered or after theloaderthrew an error:If instead of a specific route, you wanted access to the current route's
loaderDataandactionData, you can calluseRoutewithout arguments:This usage is equivalent to calling
useLoaderDataanduseActionData, but consolidates all route data access into one hook:useRoute.Note: when calling
useRoute()(without a route ID), TS has no way to know which route is the current route.As a result,
loaderDataandactionDataare typed asunknown.If you want more type-safety, you can either narrow the type yourself with something like
zodor you can refactor your app to pass down typed props to yourAdminWidget:v7.9.3Compare Source
Patch Changes
Do not try to use
turbo-streamto decode CDN errors that never reached the server (#14385)Fix Data Mode regression causing a 404 during initial load in when
middlewareexists without anyloaderfunctions (#14393)v7.9.2Compare Source
Patch Changes
middlewareon initial load even if no loaders exist (#14348)createRoutesStubto run route middleware<RoutesStub future={{ v8_middleware: true }} />flag to enable the propercontexttypeUpdate Lazy Route Discovery manifest requests to use a singular comma-separated
pathsquery param instead of repeatedpquery params (#14321)[UNSTABLE] Add
fetcher.unstable_reset()API (#14206)Made useOutlet element reference have stable identity in-between route chages (#13382)
feat: enable full transition support for the rsc router (#14362)
In RSC Data Mode, handle SSR'd client errors and re-try in the browser (#14342)
Support
middlewareprop on<Route>for usage with a data router viacreateRoutesFromElements(#14357)Handle encoded question mark and hash characters in ancestor splat routes (#14249)
Fail gracefully on manifest version mismatch logic if
sessionStorageaccess is blocked (#14335)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.