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 useFetchers so that they can be looked up by key
Form and useSumbit now support optional navigate/fetcherKey props/params to allow kicking off a fetcher submission under the hood with an optionally user-specified 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() or useFetcher({ key }) to look it up elsewhere
Persistence Future Flag (future.v7_fetcherPersist)
Per the same RFC as above, we've introduced a new future.v7_fetcherPersist flag 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 an idle state. 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 an idle state
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 via useFetcher().data
Fetchers that previously unmounted while in-flight will not be immediately aborted and will instead be cleaned up once they return to an idle state
Fix encoding/decoding issues with pre-encoded dynamic parameter values (#11199)
Updated dependencies:
@remix-run/router@1.15.1
6.22.0
Patch Changes
Updated dependencies:
@remix-run/router@1.15.0
6.21.3
Patch Changes
Remove leftover unstable_ prefix from Blocker/BlockerFunction types (#11187)
6.21.2
Patch Changes
Updated dependencies:
@remix-run/router@1.14.2
6.21.1
Patch Changes
Fix bug with route.lazy not working correctly on initial SPA load when v7_partialHydration is specified (#11121)
Updated dependencies:
@remix-run/router@1.14.1
6.21.0
Minor Changes
Add a new future.v7_relativeSplatPath flag 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:
Throw an error if an action/loader function returns undefined as revalidations need to know whether the loader has previously been executed. undefined also causes issues during SSR stringification for hydration. You should always ensure your loader/action returns a value, and you may return null if you don't wish to return anything. (#9511)
Properly handle redirects to external domains (#9590, #9654)
Preserve the HTTP method on 307/308 redirects (#9597)
This change removes the internal module-level routerSingleton we create and maintain inside our data routers since it was causing a number of headaches for non-simple use cases:
Unit tests are a pain because you need to find a way to reset the singleton in-between tests
Use use a _resetModuleScope singleton for our tests
...but this isn't exposed to users who may want to do their own tests around our router
The JSX children <Route> objects cause non-intuitive behavior based on idiomatic react expectations
Conditional runtime <Route>'s won't get picked up
Adding new <Route>'s during local dev won't get picked up during HMR
Using external state in your elements doesn't work as one might expect (see #9225)
Instead, we are going to lift the singleton out into user-land, so that they create the router singleton and manage it outside the react tree - which is what react 18 is encouraging with useSyncExternalStore anyways! This also means that since users create the router - there's no longer any difference in the rendering aspect for memory/browser/hash routers (which only impacts router/history creation) - so we can get rid of those and trim to a simple RouterProvider
// Before
function App() {
<DataBrowserRouter>
<Route path="/" element={<Layout />}>
<Route index element={<Home />}>
</Route>
<DataBrowserRouter>
}
// After
let router = createBrowserRouter([{
path: "/",
element: <Layout />,
children: [{
index: true,
deps: if using release.config.js as the name of your config file, it needs to be moved to a .config/ directory or renamed to .releaserc.js to keep it in the root of the repository. see https://github.com/cosmiconfig/cosmiconfig/releases/tag/v9.0.0 for more detail
Most Recent Ignore Conditions Applied to This Pull Request
| Dependency Name | Ignore Conditions |
| --- | --- |
| react-router | [< 6.1, > 6.0.2] |
| react-router-dom | [< 6.1, > 6.0.2] |
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 show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the major-dependecies group with 6 updates:
6.19.0
7.0.2
6.19.0
7.0.2
8.0.3
9.0.11
5.3.4
6.22.1
5.3.4
6.22.1
22.0.12
23.0.2
Updates
@typescript-eslint/eslint-plugin
from 6.19.0 to 7.0.2Release notes
Sourced from
@typescript-eslint/eslint-plugin
's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/eslint-plugin
's changelog.... (truncated)
Commits
677e7cc
chore(release): publish 7.0.2300d7d2
docs(eslint-plugin): fix typo in prefer-ts-expect-error (#8504)ebd2959
docs: small typo in no-inferrable-types.md (#8492)4f3215f
chore(release): publish 7.0.1422791c
fix(eslint-plugin): update peer dep for parser (#8441)b27de99
chore(release): publish 7.0.0379f742
chore(eslint-plugin): [no-confusing-void-expression] explicitly state default...b636baa
docs: fix restrict-plus-operands example (#8362)1aa393c
chore(deps): update dependency prettier to v3.2.5 (#8401)8ef5f4b
feat: add support for flat configs (#7935)Updates
@typescript-eslint/parser
from 6.19.0 to 7.0.2Release notes
Sourced from
@typescript-eslint/parser
's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/parser
's changelog.... (truncated)
Commits
677e7cc
chore(release): publish 7.0.24f3215f
chore(release): publish 7.0.1b27de99
chore(release): publish 7.0.01aa393c
chore(deps): update dependency prettier to v3.2.5 (#8401)8ef5f4b
feat: add support for flat configs (#7935)1200b4c
chore(deps): update nx to v17.3.0 (#8317)584db29
feat: bump ESLint, NodeJS, and TS minimum version requirements (#8377)289ee88
chore(release): publish 6.21.0aa5edf7
chore(deps): update dependency prettier to v3.2.4 (#8357)45c0cb2
chore: cleanup test-utils naming/locations (#8341)Updates
husky
from 8.0.3 to 9.0.11Release notes
Sourced from husky's releases.
... (truncated)
Commits
a9c6584
9.0.1129056db
fix: husky=0 in init (#1395)095a4fe
docs: update how-to.mdd2e831d
docs: update how-to.mdd1a8ed1
chore: update package-lock.json (#1383)c042d9b
9.0.10e529368
fix: rename index.d.ts to index.d.mts (#1379)6219cac
9.0.9d8377fe
refactor: rename files (#1378)211b80a
9.0.8Updates
react-router
from 5.3.4 to 6.22.1Release notes
Sourced from react-router's releases.
... (truncated)
Changelog
Sourced from react-router's changelog.
... (truncated)
Commits
5f0cf32
chore: Update version for release (#11283)25d16db
chore: Update version for release (pre) (#11280)241f2d4
Fix issues with pre-encoded param names not being properly decoded (#11199)3a66719
chore: Update version for release (#11242)109fb7d
chore: Update version for release (pre) (#11238)44b391a
chore: Update version for release (#11203)b4bf927
chore: Update version for release (pre) (#11196)552662a
Remove leftoverunstable_
prefix fromBlocker
/BlockerFunction
types (#1...04d653b
Copy remix script to remove prereleases from changelogs (#11183)4e528c0
chore: Update version for release (#11182)Updates
react-router-dom
from 5.3.4 to 6.22.1Release notes
Sourced from react-router-dom's releases.
... (truncated)
Changelog
Sourced from react-router-dom's changelog.
... (truncated)
Commits
5f0cf32
chore: Update version for release (#11283)25d16db
chore: Update version for release (pre) (#11280)241f2d4
Fix issues with pre-encoded param names not being properly decoded (#11199)3a66719
chore: Update version for release (#11242)109fb7d
chore: Update version for release (pre) (#11238)f5f7511
Add a window var for CWV Tech Report to look for (#11222)44b391a
chore: Update version for release (#11203)b4bf927
chore: Update version for release (pre) (#11196)b541b8d
Fix NavLink isPending with a basename (#11195)552662a
Remove leftoverunstable_
prefix fromBlocker
/BlockerFunction
types (#1...Updates
semantic-release
from 22.0.12 to 23.0.2Release notes
Sourced from semantic-release's releases.
... (truncated)
Commits
38105f5
fix(deps): update dependency marked to v12 (#3176)7fb784f
ci(action): update actions/upload-artifact action to v4.3.1 (#3181)e3245f3
ci(action): update actions/setup-node action to v4.0.2 (#3184)28bcc1d
chore(deps): update dependency prettier to v3.2.5 (#3177)9faded8
fix(deps): update dependency marked-terminal to v7fccab39
chore(deps): lock file maintenance (#3179)6be2280
chore(deps): update dependency got to v14.2.0 (#3175)518b47d
chore(deps): update dependency npm-run-all2 to v6.1.2 (#3171)c6c01aa
ci(action): update github/codeql-action action to v3.24.0 (#3173)ee4f99f
chore(deps): update dependency ava to v6.1.1 (#3168)Most Recent Ignore Conditions Applied to This Pull Request
| Dependency Name | Ignore Conditions | | --- | --- | | react-router | [< 6.1, > 6.0.2] | | react-router-dom | [< 6.1, > 6.0.2] |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 show