v6.11.0
brophdawg11
released this
28 Apr 17:10
·
3080 commits
to main
since this release
What's Changed
Minor Changes
- Enable
basename
support inuseFetcher
(#10336)- If you were previously working around this issue by manually prepending the
basename
then you will need to remove the manually prependedbasename
from yourfetcher
calls (fetcher.load('/basename/route') -> fetcher.load('/route')
)
- If you were previously working around this issue by manually prepending the
- Updated dependencies:
@remix-run/router@1.6.0
(Changelog)
Patch Changes
- When using a
RouterProvider
,useNavigate
/useSubmit
/fetcher.submit
are now stable across location changes, since we can handle relative routing via the@remix-run/router
instance and get rid of our dependence onuseLocation()
(#10336)- When using
BrowserRouter
, these hooks remain unstable across location changes because they still rely onuseLocation()
- When using
- Fetchers should no longer revalidate on search params changes or routing to the same URL, and will only revalidate on
action
submissions orrouter.revalidate
calls (#10344) - Fix inadvertent re-renders when using
Component
instead ofelement
on a route definition (#10287) - Fail gracefully on
<Link to="//">
and other invalid URL values (#10367) - Switched from
useSyncExternalStore
touseState
for internal@remix-run/router
router state syncing in<RouterProvider>
. We found some subtle bugs where router state updates got propagated before other normaluseState
updates, which could lead to foot guns inuseEffect
calls. (#10377, #10409) - Log loader/action errors caught by the default error boundary to the console in dev for easier stack trace evaluation (#10286)
- Fix bug preventing rendering of descendant
<Routes>
whenRouterProvider
errors existed (#10374) - Fix detection of
useNavigate
in the render cycle by setting theactiveRef
in a layout effect, allowing thenavigate
function to be passed to child components and called in auseEffect
there (#10394) - Allow
useRevalidator()
to resolve a loader-driven error boundary scenario (#10369) - Enhance
LoaderFunction
/ActionFunction
return type to preventundefined
from being a valid return value (#10267) - Ensure proper 404 error on
fetcher.load
call to a route without aloader
(#10345) - Decouple
AbortController
usage between revalidating fetchers and the thing that triggered them such that the unmount/deletion of a revalidating fetcher doesn't impact the ongoing triggering navigation/revalidation (#10271)
Full Changelog: https://github.com/remix-run/react-router/compare/react-router@6.10.0...react-router@6.11.0