Update dependency react-router-dom to v7.18.1 #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/react-router-dom-7.x-lockfile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
7.14.2→7.18.1Release Notes
remix-run/react-router (react-router-dom)
v7.18.1Compare Source
v7.18.0Compare Source
Date: 2026-06-16
What's Changed
CSRF Check Logic Fix
We made a bug fix in our underlying CSRF checks in this release that may be a "breaking bug fix" for some users deployed behind a reverse proxy. The CSRF check now checks directly against the
hostin therequesturl provided, instead of looking directly at HTTP headers which is an adapter concern. If your adapter is not setting the expected host in the request URL, you may need to add the new internal host to yourallowedActionOriginsconfig. This is most likely to occur in@react-router/serveapps or@react-router/expressapps without thetrust proxysetting enabled. We recommend testing this against application mutation requests as part of your upgrade.Minor Changes
@react-router/architect- Add auseRequestContextDomainNameoption tocreateRequestHandlerto derive request URL hosts from the API Gateway request context (#15185)Patch Changes
react-router- Fix server handler prerender responses when usingssr: falseandfuture.v8_trailingSlashAwareDataRequests: true(#15173)react-router- Use theServerRouternoncefor nonce-aware SSR components when they don't provide their own value so strict CSP pages can load them (#15170)react-router- Useturbo-streamto serialize and deserialize Framework Mode hydration errors (#15175)react-router- Optimize route matching by extending precomputed route branches to include matchers (#15186)react-router- Use the constructedrequestURLhostinstead of header checks when validating action request origins in the CSRF check (#15185)react-router- Remove the un-documented custom error serialization logic from Data Mode SSR built-in hydration flows (#15175)react-router- Validate protocols in RSC render redirects (#15177)react-router- Consolidate url normalization logic and better handle mixed slashes (#15176)@react-router/dev- Pass Viteserver.watchconfig to child compiler in development mode. (#15178)@react-router/dev- Ignore external Vite server environments in Framework Mode build hooks (#14883)future.v8_viteEnvironmentApiis enabled, React Router previously treated any non-client Vite environment as its own server build@react-router/express- Adjust express adapter host computation (#15185)x-forwarded-hostbased ontrust proxysettingFull Changelog:
v7.17.0...v7.18.0v7.17.0Compare Source
Date: 2026-06-04
Minor Changes
react-router- Ship a subset of the official documentation inside thereact-routerpackage (#15121)node_modules/react-router/docs, letting AI coding agents and the React Router agent skills read official docs locallyapi/),community/content, and tutorials (tutorials/)Patch Changes
@react-router/dev- Fix future flag warning URLs and only log each future flag warning one time (#15138)Unstable Changes
⚠️ Unstable features are not recommended for production use
@react-router/dev- Prevent RSC route module server exports from being scanned by the client dependency optimizer whenfuture.unstable_optimizeDepsis enabled. (#15005)Full Changelog:
v7.16.0...v7.17.0v7.16.0Compare Source
Date: 2026-05-28
Minor Changes
react-router- Stabilizefuture.unstable_trailingSlashAwareDataRequestsasfuture.v8_trailingSlashAwareDataRequests(#15098)@react-router/dev- Stabilizefuture.unstable_trailingSlashAwareDataRequestsasfuture.v8_trailingSlashAwareDataRequests(#15098)@react-router/dev- Log future flag warnings for upcoming React Router v8 flags (#15029)v8_middleware,v8_splitRouteModules,v8_viteEnvironmentApi,v8_passThroughRequests,v8_trailingSlashAwareDataRequestsPatch Changes
react-router- Disable manifest path when lazy route dicovery is disabled (#15068)react-router- Fix browser URL creation to use the configured history window instead of the global window. (#15066)createBrowserURLImplso custom window contexts keep the correct URL origin.react-router- FixuseNavigation()return type to preserve discriminated union across navigation states (#15095)react-router- WidenMetaDescriptorscript:ld+jsontype fromLdJsonObjecttoLdJsonObject | LdJsonObject[]to permit multiple JSON-LD schemas in a single<script type="application/ld+json">tag emitted by<Meta />(#15082)react-router-dom- Remove stale/invalidunpkgfield frompackage.json. This was removed from other packages with the release of v7 but missed in thereact-router-domre-export package (#15075)@react-router/express- Ignore writes after Express responses close (#15107)@react-router/node- Honor Node writable backpressure inwriteReadableStreamToWritableandwriteAsyncIterableToWritable(#15071)'drain'whenwritable.write()returnsfalseinstead of letting chunks accumulate in the writable's internal buffer.@react-router/serve- NormalizeassetsBuildDirectorypath separators inreact-router-serveso Windows-built server artifacts can serve/assets/*correctly when run on Linux. (#14982)Full Changelog:
v7.15.1...v7.16.0v7.15.1Compare Source
Date: 2026-05-14
What's New
useRouterState(unstable)Following our Less is More design goal, this release includes a new
unstable_useRouterState()hook (Framework + Data Mode) that consolidates access to active and pending router states (RFC, Roadmap Issue).This should allow you to consolidate usages of a bunch of different hooks which will likely be marked deprecated later on in v8 and potentially removed in an eventual v9:
Patch Changes
react-router- MemoizeuseFetchersto return a stable identity and only change if fetchers changed (#15028)react-router- Update router to operate on fetcher Maps in an immutable manner to avoid delayed React renders from potentially reading an updated but not yet committed Map. This could result in brief flickers in some fetcher-driven optimistic UI scenarios (#15028)react-router- FixserverLoader()returning stale SSR data when a client navigation aborts pending hydration before the hydrationclientLoaderresolves (#15022)react-router- FixRouterProvideronErrorcallback not being called for synchronous initial loader errors in SPA mode (#15039) (#14942)react-router- Internal refactor to consolidate mutation request detection through shared utility (#15033)@react-router/dev- Fixbasenameconflicting withappdirectory name when Vitebaseis set (#15027)baseconfig and React Routerbasenameboth match the app directory name (e.g.base: "/app/",basename: "/app/"), Vite would strip the base prefix from server-build virtual module import paths, causing "Failed to load url /root.tsx" errors/@​fs/absolute paths for those imports to bypass Vite's base-stripping logicUnstable Changes
⚠️ Unstable features are not recommended for production use
react-router- Add a newunstable_useRouterState()hook that consolidates access to active and pending router states (RFC: #12358) (#15017)Full Changelog:
v7.15.0...v7.15.1v7.15.0Compare Source
Date: 2026-05-05
What's Changed
Stabilizations
We've stabilized a bunch of APIs in this release in preparation for a React Router v8 release hopefully in the next month or two. These flag/prop renames are breaking changes if you've already opted into the unstable APIs so please make sure you make the appropriate changes if so.
future.unstable_passThroughRequests→future.v8_passThroughRequestsfuture.unstable_subResourceIntegrity→ top-levelconfig.subResourceIntegrityprerender.unstable_concurrency→prerender.concurrencyunstable_url→url(loader, action, middleware, instrumentation args)unstable_instrumentations→instrumentationsServerInstrumentation,ClientInstrumentation, etc.)unstable_pattern→pattern(loader, action, middleware, instrumentation args)unstable_defaultShouldRevalidate→defaultShouldRevalidateunstable_useTransitions→useTransitionsunstable_mask→mask(on<Link>,useLinkClickHandler,useNavigate, andLocation)Route matching optimizations
We've added a handful of route matching optimizations in this release for Framework and Data mode. The changes are mostly related to caching the internal flattened/ranked route branches and reducing additional calls to
matchRoutesalong the critical path. This should result in improved performance during both server-side request handling and client-side navigations.Minor Changes
react-router- Stabilizeunstable_defaultShouldRevalidateasdefaultShouldRevalidateon<Link>,<Form>,useLinkClickHandler,useSubmit,fetcher.submit, andsetSearchParams(14999)react-router- Stabilize the instrumentation APIs (14999)unstable_instrumentationsis nowinstrumentationsunstable_patternis nowpatternunstable_ServerInstrumentation,unstable_ClientInstrumentation,unstable_InstrumentRequestHandlerFunction,unstable_InstrumentRouterFunction,unstable_InstrumentRouteFunction, andunstable_InstrumentationHandlerResulttypes have had theirunstable_prefixes removedreact-router- Stabilizeunstable_maskasmaskon<Link>,useLinkClickHandler, anduseNavigate, and rename the correspondingLocation.unstable_maskfield toLocation.mask(14999)react-router- Stabilize theunstable_normalizePathoption onstaticHandler.queryandstaticHandler.queryRouteasnormalizePath(14999)react-router- Stabilizefuture.unstable_passThroughRequestsasfuture.v8_passThroughRequests(14999)react-router- Removeunstable_subResourceIntegrityfrom the runtimeFutureConfigtype; the flag is now controlled by the top-levelsubResourceIntegrityoption inreact-router.config.ts(14999)react-router- Stabilizeunstable_urlasurlonloader,action, andmiddlewarefunction args (14999)react-router- Stabilizeunstable_useTransitionsasuseTransitionson<BrowserRouter>,<HashRouter>,<HistoryRouter>,<MemoryRouter>,<Router>,<RouterProvider>,<HydratedRouter>, anduseLinkClickHandler(14999)@react-router/dev- Stabilizefuture.unstable_passThroughRequestsasfuture.v8_passThroughRequests(14999)@react-router/dev- Stabilizeprerender.unstable_concurrencyasprerender.concurrency(14999)@react-router/dev- Stabilizefuture.unstable_subResourceIntegrityas a top-levelsubResourceIntegrityconfig option inreact-router.config.ts(14999)Patch Changes
react-router- Addnonceto<Scripts><link rel="modulepreload">elements (if provided) (af5d49b)react-router- Fix a bug withunstable_defaultShouldRevalidate={false}where parent routes that did not export ashouldRevalidatefunction could be incorrectly included in the single fetch call for new child route data (#15012)react-router- Markmaskas an optional field inLocationfor easier mocking in unit tests (#14999)react-router- Improve server-side route matching performance by pre-computing flattened/cached route branches (#14967)react-router- Cache flattened/ranked route branches to optimize server-side route matching (#14967)react-router- Improve route matching performance in Framework/Data Mode (#14971)matchRoutesin data router scenarios7.6.0(#13562)matchesbut always updatingmatch.routeto the latest route in themanifestFull Changelog:
v7.14.2...v7.15.0Configuration
📅 Schedule: (UTC)
🚦 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 this update again.
This PR has been generated by Mend Renovate.
Update dependency react-router-dom to v7.15.0to Update dependency react-router-dom to v7.15.16693c8d7375b180b39f85b180b39f8d7f683db7fUpdate dependency react-router-dom to v7.15.1to Update dependency react-router-dom to v7.16.0d7f683db7f28607fcb3528607fcb3521480b050bUpdate dependency react-router-dom to v7.16.0to Update dependency react-router-dom to v7.17.021480b050b0d6266d9f7Update dependency react-router-dom to v7.17.0to Update dependency react-router-dom to v7.18.00d6266d9f7ab60fbac4aUpdate dependency react-router-dom to v7.18.0to Update dependency react-router-dom to v7.18.1View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.