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
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,
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.7.0Release notes
Sourced from eslint's releases.
... (truncated)
Changelog
Sourced from eslint's changelog.
... (truncated)
Commits
05ab812
9.7.01917cd3
Build: changelog update for 9.7.0793b718
chore: upgrade@eslint/js
@9
.7.0 (#18680)7ed6f9a
chore: package.json update for@eslint/js
release14e9f81
fix: destructuring in catch clause inno-unused-vars
(#18636)7bcda76
refactor: Add type references (#18652)51bf57c
chore: add tech sponsors through actions (#18624)9f416db
docs: Add Powered by Algolia label to the search. (#18633)6320732
refactor: don't useparent
property inNodeEventGenerator
(#18653)7bd9839
feat: add support for es2025 duplicate named capturing groups (#18630)Updates
eslint-plugin-react
from 7.33.2 to 7.34.4Release notes
Sourced from eslint-plugin-react's releases.
... (truncated)
Changelog
Sourced from eslint-plugin-react's changelog.
... (truncated)
Commits
7a7b756
Update CHANGELOG and bump version67d73aa
[Fix]sort-prop-types
: Check for undefined before accessing `node.typeAnnot...51d342b
[patch] make TS happyf1ae6ed
[Refactor]sort-comp
: use Object.entries instead of for-inbcb987a
[Refactor] usehasown
instead of the largerobject.hasown
eda77f3
[Refactor] avoid making a holey array3c1d520
[Dev Deps] downgradeeslint-remote-tester-repositories
b747450
[Fix]prop-types
: fixclassName
missing in prop validation false negativecef8123
Update CHANGELOG and bump versioneb56061
[Deps] updatearray.prototype.tosorted
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.25.0Release notes
Sourced from react-router's releases.
... (truncated)
Changelog
Sourced from react-router's changelog.
... (truncated)
Commits
13dfa13
chore: Update version for release (#11807)21b61c0
chore: Update version for release (pre) (#11800)da65120
Fix useMatch undecoded params (#11789)0a87644
chore: Update version for release (#11767)453e5f3
chore: Update version for release (pre) (#11760)fa25691
Merge branch 'release-next' into deva569d76
chore: Update version for release (#11717)54f3138
chore: format4050bef
Fix #11629 (#11633)a2f718b
chore: Update version for release (pre) (#11661)Updates
react-router-dom
from 5.3.4 to 6.25.0Release notes
Sourced from react-router-dom's releases.
... (truncated)
Changelog
Sourced from react-router-dom's changelog.
... (truncated)
Commits
13dfa13
chore: Update version for release (#11807)21b61c0
chore: Update version for release (pre) (#11800)Superseded by #3032.