New Violations: Component names now need to start with an uppercase letter instead of a non-lowercase letter. This means _Button or _component are no longer valid. (@kassens) in #25162
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
allow undefined to be resolved with <Await> (#11513)
Updated dependencies:
@remix-run/router@1.16.1
6.23.0
Minor Changes
Add a new unstable_dataStrategy configuration option (#11098)
This option allows Data Router applications to take control over the approach for executing route loaders and actions
The default implementation is today's behavior, to fetch all loaders in parallel, but this option allows users to implement more advanced data flows including Remix single-fetch, middleware/context APIs, automatic loader caching, and more
Patch Changes
Updated dependencies:
@remix-run/router@1.16.0
6.22.3
Patch Changes
Updated dependencies:
@remix-run/router@1.15.3
6.22.2
Patch Changes
Updated dependencies:
@remix-run/router@1.15.2
6.22.1
Patch Changes
Fix encoding/decoding issues with pre-encoded dynamic parameter values (#11199)
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,
Check for document existence when checking startViewTransition (#11544)
Change the react-router-dom/server import back to react-router-dom instead of index.ts (#11514)
Updated dependencies:
@remix-run/router@1.16.1
react-router@6.23.1
6.23.0
Minor Changes
Add a new unstable_dataStrategy configuration option (#11098)
This option allows Data Router applications to take control over the approach for executing route loaders and actions
The default implementation is today's behavior, to fetch all loaders in parallel, but this option allows users to implement more advanced data flows including Remix single-fetch, middleware/context APIs, automatic loader caching, and more
Bumps the major-dependecies group with 4 updates in the / directory: @rollup/plugin-commonjs, eslint, react-router and react-router-dom.
Updates
@rollup/plugin-commonjs
from 25.0.7 to 26.0.1Changelog
Sourced from
@rollup/plugin-commonjs
's changelog.Commits
8550c4b
chore(release): commonjs v26.0.104a15b5
fix(commonjs): correct import of globb3149b0
chore(release): commonjs v26.0.02447548
chore(commonjs)!: bump glob's version (#1695)8949965
chore(release): commonjs v25.0.80bb872b
fix(commonjs): preserve the class body property keys even if they are special...dcd8da5
chore(repo): use@dot/versioner
for releases (#1612)Updates
eslint
from 8.57.0 to 9.5.0Release notes
Sourced from eslint's releases.
... (truncated)
Changelog
Sourced from eslint's changelog.
... (truncated)
Commits
5352357
9.5.0f425600
Build: changelog update for 9.5.0f588160
chore: upgrade@eslint/js
@9
.5.0 (#18591)5890841
chore: package.json update for@eslint/js
release455f7fd
docs: add section about including.gitignore
files (#18590)e9f4ccd
chore: remove unused eslint-disable directive (#18589)721eafe
docs: update info about universalfiles
patterns (#18587)4b23ffd
refactor: Move JS parsing logic into JS language (#18448)6880286
fix: treat*
as a universal pattern (#18586)8127127
docs: Update READMEUpdates
eslint-plugin-react
from 7.33.2 to 7.34.3Release notes
Sourced from eslint-plugin-react's releases.
... (truncated)
Changelog
Sourced from eslint-plugin-react's changelog.
... (truncated)
Commits
cef8123
Update CHANGELOG and bump versioneb56061
[Deps] updatearray.prototype.tosorted
7d16666
[Dev Deps] update@babel/core
,@babel/eslint-parser
, `@babel/plugin-synta...6dc7803
[Fix]jsx-key
: incorrect behavior for checkKeyMustBeforeSpread with map cal...393bfa2
[Fix]no-object-type-as-default-prop
: enable rule for components with many ...a944aa5
[Fix]jsx-boolean-value
:assumeUndefinedIsFalse
withnever
must not all...a79beb3
[Fix]boolean-prop-naming
: avoid a crash with a spread prope27ef81
[Fix]prop-types
: null-check rootNode before calling getScope417e1ca
Update CHANGELOG and bump versiond79605a
[Deps] updatearray-includes
,array.prototype.findlast
, `es-iterator-help...Updates
eslint-plugin-react-hooks
from 4.6.0 to 4.6.2Changelog
Sourced from eslint-plugin-react-hooks's changelog.
Commits
Maintainer changes
This version was pushed to npm by react-bot, a new releaser for eslint-plugin-react-hooks since your current version.
Updates
react-router
from 5.3.4 to 6.23.1Release notes
Sourced from react-router's releases.
... (truncated)
Changelog
Sourced from react-router's changelog.
... (truncated)
Commits
aef5c4a
chore: Update version for release (#11551)26bc8e2
chore: Update version for release (pre) (#11545)9651465
chore: Update version for release (pre) (#11516)e0b1db4
fix: allow undefined to be resolved with\<Await>
(#11513)82a3a77
chore: Update version for release (#11486)8a20f32
chore: Update version for release (pre) (#11387)88ec71a
chore: Update version for release (pre) (#11379)12afb2e
Migrate to pnpm (#11358)c7dd3d3
Data Strategy Configuration (#11098)67009e1
chore: Update version for release (#11329)Updates
react-router-dom
from 5.3.4 to 6.23.1Release notes
Sourced from react-router-dom's releases.
... (truncated)
Changelog
Sourced from react-router-dom's changelog.
... (truncated)
Commits
aef5c4a
chore: Update version for release (#11551)26bc8e2
chore: Update version for release (pre) (#11545)031478d
Add defensive window.document check when checking for startViewTransition (#1...9651465
chore: Update version for release (pre) (#11516)Superseded by #3027.