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.4.0Release notes
Sourced from eslint's releases.
... (truncated)
Changelog
Sourced from eslint's changelog.
... (truncated)
Commits
a5f7e58
9.4.08c6d0c3
Build: changelog update for 9.4.0010dd2e
chore: upgrade to@eslint/js@9.4.0
(#18534)5e1b5dc
chore: package.json update for@eslint/js
released7ab6f5
docs: update theme when whenprefers-color-scheme
changes (#18510)594145f
refactor: switch to@eslint/config-array
(#18527)525fdff
docs: fix components files (#18519)89a4a0a
feat: ignore IIFE's in theno-loop-func
rule (#17528)80747d2
docs: refactorprefer-destructuring
rule (#18472)f6534d1
fix: skip processor code blocks that match only universal patterns (#18507)Updates
eslint-plugin-react
from 7.33.2 to 7.34.2Release notes
Sourced from eslint-plugin-react's releases.
... (truncated)
Changelog
Sourced from eslint-plugin-react's changelog.
... (truncated)
Commits
417e1ca
Update CHANGELOG and bump versiond79605a
[Deps] updatearray-includes
,array.prototype.findlast
, `es-iterator-help...ec86001
[Dev Deps] update@babel/core
,@babel/eslint-parser
, `@babel/plugin-synta...014ee05
[Fix]no-invalid-html-attribute
: ensure error messages are correct23b0a49
[Fix]jsx-closing-bracket-location
: message shows{{details}}
when there ...fbb1e0f
[Tests]jsx-no-useless-fragment
,jsx-fragments
, `function-component-defin...3533e26
[Refactor]jsx-no-constructed-context-values
: setschema: false
6c4b6fb
[meta] consistently indent .eslintrc with tabs8e1a94b
[Refactor] create getScope util;context.getScope
is deprecatedd6e9059
[Refactor]context.getSource
->sourceCode.getText
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)fdff9dd
Fix react-router-dom/server index.ts import from pnpm migration (#11514)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)Superseded by #3025.