react-router-dom
Advanced tools
Changelog
v6.8.0
Date: 2023-01-26
Support absolute URLs in <Link to>
. If the URL is for the current origin, it will still do a client-side navigation. If the URL is for a different origin then it will do a fresh document request for the new origin. (#9900)
<Link to="https://neworigin.com/some/path"> {/* Document request */}
<Link to="//neworigin.com/some/path"> {/* Document request */}
<Link to="https://www.currentorigin.com/path"> {/* Client-side navigation */}
shouldRevalidate
calls (#9948)
shouldRevalidate
function was only being called for explicit revalidation scenarios (after a mutation, manual useRevalidator
call, or an X-Remix-Revalidate
header used for cookie setting in Remix). It was not properly being called on implicit revalidation scenarios that also apply to navigation loader
revalidation, such as a change in search params or clicking a link for the page we're already on. It's now correctly called in those additional scenarios.current*
/next*
parameters reflected the static fetcher.load
URL (and thus were identical). Instead, they should have reflected the navigation that triggered the revalidation (as the form*
parameters did). These parameters now correctly reflect the triggering navigation.useSearchParams
(#9969)preventScrollReset
on <fetcher.Form>
(#9963)pagehide
instead of beforeunload
for <ScrollRestoration>
. This has better cross-browser support, specifically on Mobile Safari. (#9945)instanceof
check from isRouteErrorResponse
to avoid bundling issues on the server (#9930)defer
call only contains critical data and remove the AbortController
(#9965)File
FormData
entries (#9867)react-router-dom-v5-compat
- Fix SSR useLayoutEffect
console.error
when using CompatRouter
(#9820)Full Changelog: v6.7.0...v6.8.0
Changelog
v6.7.0
Date: 2023-01-18
unstable_useBlocker
/unstable_usePrompt
hooks for blocking navigations within the app's location origin (#9709, #9932)preventScrollReset
prop to <Form>
(#9886)useBeforeUnload
(#9709)generatePath
when optional params are present (#9764)<Await>
to accept ReactNode
as children function return result (#9896)jsdom
bug workaround in tests (#9824)Full Changelog: v6.6.2...v6.7.0