fix(deps): update dependency react-router-dom to ~6.14.0
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
react-router-dom | dependencies | minor | ~6.11.2 -> ~6.14.0 |
Release Notes
remix-run/react-router (react-router-dom)
v6.14.2
Patch Changes
- Properly decode element id when emulating hash scrolling via
<ScrollRestoration>
(#10682) - Add missing
<Form state>
prop to populatehistory.state
on submission navigations (#10630) - Support proper hydration of
Error
subclasses such asReferenceError
/TypeError
(#10633) - Updated dependencies:
@remix-run/router@1.7.2
react-router@6.14.2
v6.14.1
Patch Changes
- Updated dependencies:
react-router@6.14.1
@remix-run/router@1.7.1
v6.14.0
Minor Changes
-
Add support for
application/json
andtext/plain
encodings foruseSubmit
/fetcher.submit
. To reflect these additional types,useNavigation
/useFetcher
now also containnavigation.json
/navigation.text
andfetcher.json
/fetcher.text
which include the json/text submission if applicable (#10413)// The default behavior will still serialize as FormData function Component() { let navigation = useNavigation(); let submit = useSubmit(); submit({ key: "value" }, { method: "post" }); // navigation.formEncType => "application/x-www-form-urlencoded" // navigation.formData => FormData instance } async function action({ request }) { // request.headers.get("Content-Type") => "application/x-www-form-urlencoded" // await request.formData() => FormData instance }
// Opt-into JSON encoding with `encType: "application/json"` function Component() { let navigation = useNavigation(); let submit = useSubmit(); submit({ key: "value" }, { method: "post", encType: "application/json" }); // navigation.formEncType => "application/json" // navigation.json => { key: "value" } } async function action({ request }) { // request.headers.get("Content-Type") => "application/json" // await request.json() => { key: "value" } }
// Opt-into text encoding with `encType: "text/plain"` function Component() { let navigation = useNavigation(); let submit = useSubmit(); submit("Text submission", { method: "post", encType: "text/plain" }); // navigation.formEncType => "text/plain" // navigation.text => "Text submission" } async function action({ request }) { // request.headers.get("Content-Type") => "text/plain" // await request.text() => "Text submission" }
Patch Changes
- When submitting a form from a
submitter
element, prefer the built-innew FormData(form, submitter)
instead of the previous manual approach in modern browsers (those that support the newsubmitter
parameter) (#9865, #10627)- For browsers that don't support it, we continue to just append the submit button's entry to the end, and we also add rudimentary support for
type="image"
buttons - If developers want full spec-compliant support for legacy browsers, they can use the
formdata-submitter-polyfill
- For browsers that don't support it, we continue to just append the submit button's entry to the end, and we also add rudimentary support for
- Call
window.history.pushState/replaceState
before updating React Router state (instead of after) so thatwindow.location
matchesuseLocation
during synchronous React 17 rendering (#10448)-
⚠ ️ However, generally apps should not be relying onwindow.location
and should always referenceuseLocation
when possible, aswindow.location
will not be in sync 100% of the time (due topopstate
events, concurrent mode, etc.)
-
- Fix
tsc --skipLibCheck:false
issues on React 17 (#10622) - Upgrade
typescript
to 5.1 (#10581) - Updated dependencies:
react-router@6.14.0
@remix-run/router@1.7.0
v6.13.0
Minor Changes
-
Move
React.startTransition
usage behind a future flag to avoid issues with existing incompatibleSuspense
usages. We recommend folks adopting this flag to be better compatible with React concurrent mode, but if you run into issues you can continue without the use ofstartTransition
until v7. Issues usually boils down to creating net-new promises during the render cycle, so if you run into issues you should either lift your promise creation out of the render cycle or put it behind auseMemo
. (#10596)Existing behavior will no longer include
React.startTransition
:<BrowserRouter> <Routes>{/*...*/}</Routes> </BrowserRouter> <RouterProvider router={router} />
If you wish to enable
React.startTransition
, pass the future flag to your component:<BrowserRouter future={{ v7_startTransition: true }}> <Routes>{/*...*/}</Routes> </BrowserRouter> <RouterProvider router={router} future={{ v7_startTransition: true }}/>
Patch Changes
- Work around webpack/terser
React.startTransition
minification bug in production mode (#10588) - Updated dependencies:
react-router@6.13.0
v6.12.1
Warning Please use version
6.13.0
or later instead of6.12.1
. This version suffers from awebpack
/terser
minification issue resulting in invalid minified code in your resulting production bundles which can cause issues in your application. See #10579 for more details.
Patch Changes
- Adjust feature detection of
React.startTransition
to fix webpack + react 17 compilation error (#10569) - Updated dependencies:
react-router@6.12.1
v6.12.0
Minor Changes
- Wrap internal router state updates with
React.startTransition
if it exists (#10438)
Patch Changes
- Re-throw
DOMException
(DataCloneError
) when attempting to perform aPUSH
navigation with non-serializable state. (#10427) - Updated dependencies:
@remix-run/router@1.6.3
react-router@6.12.0
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.