backstage-plugin-announcements
backstage-plugin-announcements copied to clipboard
Bump react-router from 6.4.3 to 6.11.1
Bumps react-router from 6.4.3 to 6.11.1.
Release notes
Sourced from react-router's releases.
v6.11.1
Patch Changes
- Fix usage of
Component
API within descendant<Routes>
(#10434)- Fix bug when calling
useNavigate
from<Routes>
inside a<RouterProvider>
(#10432)- Fix usage of
<Navigate>
in strict mode when using a data router (#10435)- Fix
basename
handling when navigating without a path (#10433)- "Same hash" navigations no longer re-run loaders to match browser behavior (i.e.
/path#hash -> /path#hash
) (#10408)Full Changelog: https://github.com/remix-run/react-router/compare/[email protected]@6.11.1
v6.11.0
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')
)- Updated dependencies:
@remix-run/[email protected]
(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()
- 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/[email protected]@6.11.0
v6.10.0
What's Changed
We recently published a post over on the Remix Blog titled "Future Proofing Your Remix App" that goes through our strategy to ensure smooth upgrades for your Remix and React Router apps going forward. React Router
6.10.0
adds support for these flags (for data routers) which you can specify when you create your router:const router = createBrowserRouter(routes, { future: { // specify future flags here }, </tr></table>
... (truncated)
Changelog
Sourced from react-router's changelog.
6.11.1
Patch Changes
- Fix usage of
Component
API within descendant<Routes>
(#10434)- Fix bug when calling
useNavigate
from<Routes>
inside a<RouterProvider>
(#10432)- Fix usage of
<Navigate>
in strict mode when using a data router (#10435)- Updated dependencies:
@remix-run/[email protected]
6.11.0
Patch Changes
- Log loader/action errors to the console in dev for easier stack trace evaluation (#10286)
- Fix bug preventing rendering of descendant
<Routes>
whenRouterProvider
errors existed (#10374)- Fix inadvertent re-renders when using
Component
instead ofelement
on a route definition (#10287)- 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)- 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 footguns inuseEffect
calls. (#10377, #10409)- Allow
useRevalidator()
to resolve a loader-driven error boundary scenario (#10369)- Avoid unnecessary unsubscribe/resubscribes on router state changes (#10409)
- 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()
. When usingBrowserRouter
, these hooks remain unstable across location changes because they still rely onuseLocation()
. (#10336)- Updated dependencies:
@remix-run/[email protected]
6.10.0
Minor Changes
Added support for Future Flags in React Router. The first flag being introduced is
future.v7_normalizeFormMethod
which will normalize the exposeduseNavigation()/useFetcher()
formMethod
fields as uppercase HTTP methods to align with thefetch()
behavior. (#10207)
- When
future.v7_normalizeFormMethod === false
(default v6 behavior),
useNavigation().formMethod
is lowercaseuseFetcher().formMethod
is lowercase- When
future.v7_normalizeFormMethod === true
:
useNavigation().formMethod
is uppercaseuseFetcher().formMethod
is uppercasePatch Changes
- Fix route ID generation when using Fragments in
createRoutesFromElements
(#10193)- Updated dependencies:
@remix-run/[email protected]
6.9.0
Minor Changes
- React Router now supports an alternative way to define your route
element
anderrorElement
fields as React Components instead of React Elements. You can instead pass a React Component to the newComponent
andErrorBoundary
fields if you choose. There is no functional difference between the two, so use whichever approach you prefer 😀. You shouldn't be defining both, but if you doComponent
/ErrorBoundary
will "win". (#10045)
... (truncated)
Commits
db696c1
chore: Update version for release (#10443)b725c3b
chore: Update version for release (pre) (#10436)c4e9607
Fix usage of Navigate in strict mode when using a data router (#10435)5e195ec
Fix useNAvigate when called from <Routes> inside a <RouterProvider> (#10432)666d962
Fix usage of Component API within descendant routes (#10434)7ff51c0
chore: Update version for release (#10414)5ec9f8e
chore: Update version for release (pre) (#10410)f4a452b
Avoid unnecessary router subscribes (#10409)82ca7c0
chore: Update version for release (pre) (#10402)bf8ee9d
chore: Update version for release (pre) (#10398)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)