confs.tech
confs.tech copied to clipboard
Bump react-router from 5.3.4 to 6.21.1
Bumps react-router from 5.3.4 to 6.21.1.
Release notes
Sourced from react-router's releases.
v6.21.1
Release notes are stored in the
CHANGELOG.mdfile:https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v6211
v6.21.0
Release notes are stored in the
CHANGELOG.mdfile:https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v6210
v6.20.1
Release notes are stored in the
CHANGELOG.mdfile:https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v6201
v6.20.0
Release notes are stored in the
CHANGELOG.mdfile:https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v6200
v6.19.0
Release notes are stored in the
CHANGELOG.mdfile:https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v6190
v6.18.0
Minor Changes
New Fetcher APIs
Per this RFC, we've introduced some new APIs that give you more granular control over your fetcher behaviors. (#10960)
- You may now specify your own fetcher identifier via
useFetcher({ key: string }), which allows you to access the same fetcher instance from different components in your application without prop-drilling- Fetcher keys are now exposed on the fetchers returned from
useFetchersso that they can be looked up bykeyFormanduseSumbitnow support optionalnavigate/fetcherKeyprops/params to allow kicking off a fetcher submission under the hood with an optionally user-specifiedkey
<Form method="post" navigate={false} fetcherKey="my-key">submit(data, { method: "post", navigate: false, fetcherKey: "my-key" })- Invoking a fetcher in this way is ephemeral and stateless
- If you need to access the state of one of these fetchers, you will need to leverage
useFetchers()oruseFetcher({ key })to look it up elsewherePersistence Future Flag (
future.v7_fetcherPersist)Per the same RFC as above, we've introduced a new
future.v7_fetcherPersistflag that allows you to opt-into the new fetcher persistence/cleanup behavior. Instead of being immediately cleaned up on unmount, fetchers will persist until they return to anidlestate. This makes pending/optimistic UI much easier in scenarios where the originating fetcher needs to unmount. (#10962)
- This is sort of a long-standing bug fix as the
useFetchers()API was always supposed to only reflect in-flight fetcher information for pending/optimistic UI -- it was not intended to reflect fetcher data or hang onto fetchers after they returned to anidlestate- Keep an eye out for the following specific behavioral changes when opting into this flag and check your app for compatibility:
- Fetchers that complete while still mounted will no longer appear in
useFetchers()after completion - they served no purpose in there since you can access the data viauseFetcher().data- Fetchers that previously unmounted while in-flight will not be immediately aborted and will instead be cleaned up once they return to an
idlestate
- They will remain exposed via
useFetcherswhile in-flight so you can still access pending/optimistic data after unmount- If a fetcher is no longer mounted when it completes, then it's result will not be post processed - e.g., redirects will not be followed and errors will not bubble up in the UI
... (truncated)
Changelog
Sourced from react-router's changelog.
6.21.1
Patch Changes
- Fix bug with
route.lazynot working correctly on initial SPA load whenv7_partialHydrationis specified (#11121)- Updated dependencies:
@remix-run/[email protected]6.21.0
Minor Changes
Add a new
future.v7_relativeSplatPathflag to implement a breaking bug fix to relative routing when inside a splat route. (#11087)This fix was originally added in #10983 and was later reverted in #11078 because it was determined that a large number of existing applications were relying on the buggy behavior (see #11052)
The Bug The buggy behavior is that without this flag, the default behavior when resolving relative paths is to ignore any splat (
*) portion of the current route path.The Background This decision was originally made thinking that it would make the concept of nested different sections of your apps in
<Routes>easier if relative routing would replace the current splat:<BrowserRouter> <Routes> <Route path="/" element={<Home />} /> <Route path="dashboard/*" element={<Dashboard />} /> </Routes> </BrowserRouter>Any paths like
/dashboard,/dashboard/team,/dashboard/projectswill match theDashboardroute. The dashboard component itself can then render nested<Routes>:function Dashboard() { return ( <div> <h2>Dashboard</h2> <nav> <Link to="/">Dashboard Home</Link> <Link to="team">Team</Link> <Link to="projects">Projects</Link> </nav><Routes> <Route path="/" element={<DashboardHome />} /> <Route path="team" element={<DashboardTeam />} /> <Route path="projects" element={<DashboardProjects />} /> </Routes> </div>
... (truncated)
Commits
08cda17chore: Update version for release (#11132)e5d73cfchore: Update version for release (pre) (#11131)ba99ec5Merge branch 'main' into release-next0f04d11Fix issues with partial hydration combined with route.lazy (#11121)cc4436cUpdate changelogs for useResolvedSplat example87d5d61Fix unit test (#11115)69ba50echore: Update version for release (#11114)ea0ffeechore: Update version for release (pre) (#11095)fe3c071Slight refactor to partial hydration to leverage state.initialized properly (...373b30cchore: Update version for release (pre) (#11091)- Additional commits viewable in compare view
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
A newer version of react-router exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.
@dependabot rebase
Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!
If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.
@dependabot recreate
Superseded by #636.