react-router-dom 0.0.0-experimental-e56aa53bc → 0.0.0-experimental-e6fb6e074

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,1009 @@
1
+ # `react-router-dom`
2
+
3
+ ## 6.30.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add `fetcherKey` as a parameter to `patchRoutesOnNavigation` ([#13109](https://github.com/remix-run/react-router/pull/13109))
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies:
12
+ - `@remix-run/router@1.23.0`
13
+ - `react-router@6.30.0`
14
+
15
+ ## 6.29.0
16
+
17
+ ### Minor Changes
18
+
19
+ - Provide the request `signal` as a parameter to `patchRoutesOnNavigation` ([#12900](https://github.com/remix-run/react-router/pull/12900))
20
+
21
+ - This can be used to abort any manifest fetches if the in-flight navigation/fetcher is aborted
22
+
23
+ ### Patch Changes
24
+
25
+ - Do not log v7 deprecation warnings in production builds ([#12794](https://github.com/remix-run/react-router/pull/12794))
26
+ - Updated dependencies:
27
+ - `react-router@6.29.0`
28
+ - `@remix-run/router@1.22.0`
29
+
30
+ ## 6.28.2
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies:
35
+ - `@remix-run/router@1.21.1`
36
+ - `react-router@6.28.2`
37
+
38
+ ## 6.28.1
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies:
43
+ - `react-router@6.28.1`
44
+
45
+ ## 6.28.0
46
+
47
+ ### Minor Changes
48
+
49
+ - Log deprecation warnings for v7 flags ([#11750](https://github.com/remix-run/react-router/pull/11750))
50
+ - Add deprecation warnings to `json`/`defer` in favor of returning raw objects
51
+ - These methods will be removed in React Router v7
52
+
53
+ ### Patch Changes
54
+
55
+ - Update JSDoc URLs for new website structure (add /v6/ segment) ([#12141](https://github.com/remix-run/react-router/pull/12141))
56
+ - Updated dependencies:
57
+ - `react-router@6.28.0`
58
+ - `@remix-run/router@1.21.0`
59
+
60
+ ## 6.27.0
61
+
62
+ ### Minor Changes
63
+
64
+ - Stabilize `unstable_patchRoutesOnNavigation` ([#11973](https://github.com/remix-run/react-router/pull/11973))
65
+ - Add new `PatchRoutesOnNavigationFunctionArgs` type for convenience ([#11967](https://github.com/remix-run/react-router/pull/11967))
66
+ - Stabilize `unstable_dataStrategy` ([#11974](https://github.com/remix-run/react-router/pull/11974))
67
+ - Stabilize the `unstable_flushSync` option for navigations and fetchers ([#11989](https://github.com/remix-run/react-router/pull/11989))
68
+ - Stabilize the `unstable_viewTransition` option for navigations and the corresponding `unstable_useViewTransitionState` hook ([#11989](https://github.com/remix-run/react-router/pull/11989))
69
+
70
+ ### Patch Changes
71
+
72
+ - Fix bug when submitting to the current contextual route (parent route with an index child) when an `?index` param already exists from a prior submission ([#12003](https://github.com/remix-run/react-router/pull/12003))
73
+
74
+ - Fix `useFormAction` bug - when removing `?index` param it would not keep other non-Remix `index` params ([#12003](https://github.com/remix-run/react-router/pull/12003))
75
+
76
+ - Fix types for `RouteObject` within `PatchRoutesOnNavigationFunction`'s `patch` method so it doesn't expect agnostic route objects passed to `patch` ([#11967](https://github.com/remix-run/react-router/pull/11967))
77
+
78
+ - Updated dependencies:
79
+ - `react-router@6.27.0`
80
+ - `@remix-run/router@1.20.0`
81
+
82
+ ## 6.26.2
83
+
84
+ ### Patch Changes
85
+
86
+ - Updated dependencies:
87
+ - `@remix-run/router@1.19.2`
88
+ - `react-router@6.26.2`
89
+
90
+ ## 6.26.1
91
+
92
+ ### Patch Changes
93
+
94
+ - Rename `unstable_patchRoutesOnMiss` to `unstable_patchRoutesOnNavigation` to match new behavior ([#11888](https://github.com/remix-run/react-router/pull/11888))
95
+ - Updated dependencies:
96
+ - `@remix-run/router@1.19.1`
97
+ - `react-router@6.26.1`
98
+
99
+ ## 6.26.0
100
+
101
+ ### Minor Changes
102
+
103
+ - Add a new `replace(url, init?)` alternative to `redirect(url, init?)` that performs a `history.replaceState` instead of a `history.pushState` on client-side navigation redirects ([#11811](https://github.com/remix-run/react-router/pull/11811))
104
+
105
+ ### Patch Changes
106
+
107
+ - Fix initial hydration behavior when using `future.v7_partialHydration` along with `unstable_patchRoutesOnMiss` ([#11838](https://github.com/remix-run/react-router/pull/11838))
108
+ - During initial hydration, `router.state.matches` will now include any partial matches so that we can render ancestor `HydrateFallback` components
109
+ - Updated dependencies:
110
+ - `@remix-run/router@1.19.0`
111
+ - `react-router@6.26.0`
112
+
113
+ ## 6.25.1
114
+
115
+ ### Patch Changes
116
+
117
+ - Memoize some `RouterProvider` internals to reduce unnecessary re-renders ([#11803](https://github.com/remix-run/react-router/pull/11803))
118
+ - Updated dependencies:
119
+ - `react-router@6.25.1`
120
+
121
+ ## 6.25.0
122
+
123
+ ### Minor Changes
124
+
125
+ - Stabilize `future.unstable_skipActionErrorRevalidation` as `future.v7_skipActionErrorRevalidation` ([#11769](https://github.com/remix-run/react-router/pull/11769))
126
+ - When this flag is enabled, actions will not automatically trigger a revalidation if they return/throw a `Response` with a `4xx`/`5xx` status code
127
+ - You may still opt-into revalidation via `shouldRevalidate`
128
+ - This also changes `shouldRevalidate`'s `unstable_actionStatus` parameter to `actionStatus`
129
+
130
+ ### Patch Changes
131
+
132
+ - Updated dependencies:
133
+ - `react-router@6.25.0`
134
+ - `@remix-run/router@1.18.0`
135
+
136
+ ## 6.24.1
137
+
138
+ ### Patch Changes
139
+
140
+ - Remove `polyfill.io` reference from warning message because the domain was sold and has since been determined to serve malware ([#11741](https://github.com/remix-run/react-router/pull/11741))
141
+ - See <https://sansec.io/research/polyfill-supply-chain-attack>
142
+ - Export `NavLinkRenderProps` type for easier typing of custom `NavLink` callback ([#11553](https://github.com/remix-run/react-router/pull/11553))
143
+ - Updated dependencies:
144
+ - `@remix-run/router@1.17.1`
145
+ - `react-router@6.24.1`
146
+
147
+ ## 6.24.0
148
+
149
+ ### Minor Changes
150
+
151
+ - Add support for Lazy Route Discovery (a.k.a. Fog of War) ([#11626](https://github.com/remix-run/react-router/pull/11626))
152
+ - RFC: <https://github.com/remix-run/react-router/discussions/11113>
153
+ - `unstable_patchRoutesOnMiss` docs: <https://reactrouter.com/v6/routers/create-browser-router>
154
+
155
+ ### Patch Changes
156
+
157
+ - Fix `fetcher.submit` types - remove incorrect `navigate`/`fetcherKey`/`unstable_viewTransition` options because they are only relevant for `useSubmit` ([#11631](https://github.com/remix-run/react-router/pull/11631))
158
+ - Allow falsy `location.state` values passed to `<StaticRouter>` ([#11495](https://github.com/remix-run/react-router/pull/11495))
159
+ - Updated dependencies:
160
+ - `react-router@6.24.0`
161
+ - `@remix-run/router@1.17.0`
162
+
163
+ ## 6.23.1
164
+
165
+ ### Patch Changes
166
+
167
+ - Check for `document` existence when checking `startViewTransition` ([#11544](https://github.com/remix-run/react-router/pull/11544))
168
+ - Change the `react-router-dom/server` import back to `react-router-dom` instead of `index.ts` ([#11514](https://github.com/remix-run/react-router/pull/11514))
169
+ - Updated dependencies:
170
+ - `@remix-run/router@1.16.1`
171
+ - `react-router@6.23.1`
172
+
173
+ ## 6.23.0
174
+
175
+ ### Minor Changes
176
+
177
+ - Add a new `unstable_dataStrategy` configuration option ([#11098](https://github.com/remix-run/react-router/pull/11098))
178
+ - This option allows Data Router applications to take control over the approach for executing route loaders and actions
179
+ - 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
180
+
181
+ ### Patch Changes
182
+
183
+ - Updated dependencies:
184
+ - `@remix-run/router@1.16.0`
185
+ - `react-router@6.23.0`
186
+
187
+ ## 6.22.3
188
+
189
+ ### Patch Changes
190
+
191
+ - Updated dependencies:
192
+ - `@remix-run/router@1.15.3`
193
+ - `react-router@6.22.3`
194
+
195
+ ## 6.22.2
196
+
197
+ ### Patch Changes
198
+
199
+ - Updated dependencies:
200
+ - `@remix-run/router@1.15.2`
201
+ - `react-router@6.22.2`
202
+
203
+ ## 6.22.1
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies:
208
+ - `react-router@6.22.1`
209
+ - `@remix-run/router@1.15.1`
210
+
211
+ ## 6.22.0
212
+
213
+ ### Minor Changes
214
+
215
+ - Include a `window__reactRouterVersion` tag for CWV Report detection ([#11222](https://github.com/remix-run/react-router/pull/11222))
216
+
217
+ ### Patch Changes
218
+
219
+ - Updated dependencies:
220
+ - `@remix-run/router@1.15.0`
221
+ - `react-router@6.22.0`
222
+
223
+ ## 6.21.3
224
+
225
+ ### Patch Changes
226
+
227
+ - Fix `NavLink` `isPending` when a `basename` is used ([#11195](https://github.com/remix-run/react-router/pull/11195))
228
+ - Remove leftover `unstable_` prefix from `Blocker`/`BlockerFunction` types ([#11187](https://github.com/remix-run/react-router/pull/11187))
229
+ - Updated dependencies:
230
+ - `react-router@6.21.3`
231
+
232
+ ## 6.21.2
233
+
234
+ ### Patch Changes
235
+
236
+ - Leverage `useId` for internal fetcher keys when available ([#11166](https://github.com/remix-run/react-router/pull/11166))
237
+ - Updated dependencies:
238
+ - `@remix-run/router@1.14.2`
239
+ - `react-router@6.21.2`
240
+
241
+ ## 6.21.1
242
+
243
+ ### Patch Changes
244
+
245
+ - Updated dependencies:
246
+ - `react-router@6.21.1`
247
+ - `@remix-run/router@1.14.1`
248
+
249
+ ## 6.21.0
250
+
251
+ ### Minor Changes
252
+
253
+ - Add a new `future.v7_relativeSplatPath` flag to implement a breaking bug fix to relative routing when inside a splat route. ([#11087](https://github.com/remix-run/react-router/pull/11087))
254
+
255
+ This fix was originally added in [#10983](https://github.com/remix-run/react-router/issues/10983) and was later reverted in [#11078](https://github.com/remix-run/react-router/pull/11078) because it was determined that a large number of existing applications were relying on the buggy behavior (see [#11052](https://github.com/remix-run/react-router/issues/11052))
256
+
257
+ **The Bug**
258
+ 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.
259
+
260
+ **The Background**
261
+ 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:
262
+
263
+ ```jsx
264
+ <BrowserRouter>
265
+ <Routes>
266
+ <Route path="/" element={<Home />} />
267
+ <Route path="dashboard/*" element={<Dashboard />} />
268
+ </Routes>
269
+ </BrowserRouter>
270
+ ```
271
+
272
+ Any paths like `/dashboard`, `/dashboard/team`, `/dashboard/projects` will match the `Dashboard` route. The dashboard component itself can then render nested `<Routes>`:
273
+
274
+ ```jsx
275
+ function Dashboard() {
276
+ return (
277
+ <div>
278
+ <h2>Dashboard</h2>
279
+ <nav>
280
+ <Link to="/">Dashboard Home</Link>
281
+ <Link to="team">Team</Link>
282
+ <Link to="projects">Projects</Link>
283
+ </nav>
284
+
285
+ <Routes>
286
+ <Route path="/" element={<DashboardHome />} />
287
+ <Route path="team" element={<DashboardTeam />} />
288
+ <Route path="projects" element={<DashboardProjects />} />
289
+ </Routes>
290
+ </div>
291
+ );
292
+ }
293
+ ```
294
+
295
+ Now, all links and route paths are relative to the router above them. This makes code splitting and compartmentalizing your app really easy. You could render the `Dashboard` as its own independent app, or embed it into your large app without making any changes to it.
296
+
297
+ **The Problem**
298
+
299
+ The problem is that this concept of ignoring part of a path breaks a lot of other assumptions in React Router - namely that `"."` always means the current location pathname for that route. When we ignore the splat portion, we start getting invalid paths when using `"."`:
300
+
301
+ ```jsx
302
+ // If we are on URL /dashboard/team, and we want to link to /dashboard/team:
303
+ function DashboardTeam() {
304
+ // ❌ This is broken and results in <a href="/dashboard">
305
+ return <Link to=".">A broken link to the Current URL</Link>;
306
+
307
+ // ✅ This is fixed but super unintuitive since we're already at /dashboard/team!
308
+ return <Link to="./team">A broken link to the Current URL</Link>;
309
+ }
310
+ ```
311
+
312
+ We've also introduced an issue that we can no longer move our `DashboardTeam` component around our route hierarchy easily - since it behaves differently if we're underneath a non-splat route, such as `/dashboard/:widget`. Now, our `"."` links will, properly point to ourself _inclusive of the dynamic param value_ so behavior will break from it's corresponding usage in a `/dashboard/*` route.
313
+
314
+ Even worse, consider a nested splat route configuration:
315
+
316
+ ```jsx
317
+ <BrowserRouter>
318
+ <Routes>
319
+ <Route path="dashboard">
320
+ <Route path="*" element={<Dashboard />} />
321
+ </Route>
322
+ </Routes>
323
+ </BrowserRouter>
324
+ ```
325
+
326
+ Now, a `<Link to=".">` and a `<Link to="..">` inside the `Dashboard` component go to the same place! That is definitely not correct!
327
+
328
+ Another common issue arose in Data Routers (and Remix) where any `<Form>` should post to it's own route `action` if you the user doesn't specify a form action:
329
+
330
+ ```jsx
331
+ let router = createBrowserRouter({
332
+ path: "/dashboard",
333
+ children: [
334
+ {
335
+ path: "*",
336
+ action: dashboardAction,
337
+ Component() {
338
+ // ❌ This form is broken! It throws a 405 error when it submits because
339
+ // it tries to submit to /dashboard (without the splat value) and the parent
340
+ // `/dashboard` route doesn't have an action
341
+ return <Form method="post">...</Form>;
342
+ },
343
+ },
344
+ ],
345
+ });
346
+ ```
347
+
348
+ This is just a compounded issue from the above because the default location for a `Form` to submit to is itself (`"."`) - and if we ignore the splat portion, that now resolves to the parent route.
349
+
350
+ **The Solution**
351
+ If you are leveraging this behavior, it's recommended to enable the future flag, move your splat to it's own route, and leverage `../` for any links to "sibling" pages:
352
+
353
+ ```jsx
354
+ <BrowserRouter>
355
+ <Routes>
356
+ <Route path="dashboard">
357
+ <Route index path="*" element={<Dashboard />} />
358
+ </Route>
359
+ </Routes>
360
+ </BrowserRouter>
361
+
362
+ function Dashboard() {
363
+ return (
364
+ <div>
365
+ <h2>Dashboard</h2>
366
+ <nav>
367
+ <Link to="..">Dashboard Home</Link>
368
+ <Link to="../team">Team</Link>
369
+ <Link to="../projects">Projects</Link>
370
+ </nav>
371
+
372
+ <Routes>
373
+ <Route path="/" element={<DashboardHome />} />
374
+ <Route path="team" element={<DashboardTeam />} />
375
+ <Route path="projects" element={<DashboardProjects />} />
376
+ </Router>
377
+ </div>
378
+ );
379
+ }
380
+ ```
381
+
382
+ This way, `.` means "the full current pathname for my route" in all cases (including static, dynamic, and splat routes) and `..` always means "my parents pathname".
383
+
384
+ ### Patch Changes
385
+
386
+ - Updated dependencies:
387
+ - `@remix-run/router@1.14.0`
388
+ - `react-router@6.21.0`
389
+
390
+ ## 6.20.1
391
+
392
+ ### Patch Changes
393
+
394
+ - Revert the `useResolvedPath` fix for splat routes due to a large number of applications that were relying on the buggy behavior (see <https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329>). We plan to re-introduce this fix behind a future flag in the next minor version. ([#11078](https://github.com/remix-run/react-router/pull/11078))
395
+ - Updated dependencies:
396
+ - `react-router@6.20.1`
397
+ - `@remix-run/router@1.13.1`
398
+
399
+ ## 6.20.0
400
+
401
+ ### Minor Changes
402
+
403
+ - Export the `PathParam` type from the public API ([#10719](https://github.com/remix-run/react-router/pull/10719))
404
+
405
+ ### Patch Changes
406
+
407
+ - Updated dependencies:
408
+ - `react-router@6.20.0`
409
+ - `@remix-run/router@1.13.0`
410
+
411
+ ## 6.19.0
412
+
413
+ ### Minor Changes
414
+
415
+ - Add `unstable_flushSync` option to `useNavigate`/`useSumbit`/`fetcher.load`/`fetcher.submit` to opt-out of `React.startTransition` and into `ReactDOM.flushSync` for state updates ([#11005](https://github.com/remix-run/react-router/pull/11005))
416
+ - Allow `unstable_usePrompt` to accept a `BlockerFunction` in addition to a `boolean` ([#10991](https://github.com/remix-run/react-router/pull/10991))
417
+
418
+ ### Patch Changes
419
+
420
+ - Fix issue where a changing fetcher `key` in a `useFetcher` that remains mounted wasn't getting picked up ([#11009](https://github.com/remix-run/react-router/pull/11009))
421
+ - Fix `useFormAction` which was incorrectly inheriting the `?index` query param from child route `action` submissions ([#11025](https://github.com/remix-run/react-router/pull/11025))
422
+ - Fix `NavLink` `active` logic when `to` location has a trailing slash ([#10734](https://github.com/remix-run/react-router/pull/10734))
423
+ - Updated dependencies:
424
+ - `react-router@6.19.0`
425
+ - `@remix-run/router@1.12.0`
426
+
427
+ ## 6.18.0
428
+
429
+ ### Minor Changes
430
+
431
+ - Add support for manual fetcher key specification via `useFetcher({ key: string })` so you can access the same fetcher instance from different components in your application without prop-drilling ([RFC](https://github.com/remix-run/remix/discussions/7698)) ([#10960](https://github.com/remix-run/react-router/pull/10960))
432
+
433
+ - Fetcher keys are now also exposed on the fetchers returned from `useFetchers` so that they can be looked up by `key`
434
+
435
+ - Add `navigate`/`fetcherKey` params/props to `useSumbit`/`Form` to support kicking off a fetcher submission under the hood with an optionally user-specified `key` ([#10960](https://github.com/remix-run/react-router/pull/10960))
436
+
437
+ - Invoking a fetcher in this way is ephemeral and stateless
438
+ - If you need to access the state of one of these fetchers, you will need to leverage `useFetcher({ key })` to look it up elsewhere
439
+
440
+ ### Patch Changes
441
+
442
+ - Adds a fetcher context to `RouterProvider` that holds completed fetcher data, in preparation for the upcoming future flag that will change the fetcher persistence/cleanup behavior ([#10961](https://github.com/remix-run/react-router/pull/10961))
443
+ - Fix the `future` prop on `BrowserRouter`, `HashRouter` and `MemoryRouter` so that it accepts a `Partial<FutureConfig>` instead of requiring all flags to be included. ([#10962](https://github.com/remix-run/react-router/pull/10962))
444
+ - Updated dependencies:
445
+ - `@remix-run/router@1.11.0`
446
+ - `react-router@6.18.0`
447
+
448
+ ## 6.17.0
449
+
450
+ ### Minor Changes
451
+
452
+ - Add experimental support for the [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition) via `document.startViewTransition` to enable CSS animated transitions on SPA navigations in your application. ([#10916](https://github.com/remix-run/react-router/pull/10916))
453
+
454
+ The simplest approach to enabling a View Transition in your React Router app is via the new `<Link unstable_viewTransition>` prop. This will cause the navigation DOM update to be wrapped in `document.startViewTransition` which will enable transitions for the DOM update. Without any additional CSS styles, you'll get a basic cross-fade animation for your page.
455
+
456
+ If you need to apply more fine-grained styles for your animations, you can leverage the `unstable_useViewTransitionState` hook which will tell you when a transition is in progress and you can use that to apply classes or styles:
457
+
458
+ ```jsx
459
+ function ImageLink(to, src, alt) {
460
+ let isTransitioning = unstable_useViewTransitionState(to);
461
+ return (
462
+ <Link to={to} unstable_viewTransition>
463
+ <img
464
+ src={src}
465
+ alt={alt}
466
+ style={{
467
+ viewTransitionName: isTransitioning ? "image-expand" : "",
468
+ }}
469
+ />
470
+ </Link>
471
+ );
472
+ }
473
+ ```
474
+
475
+ You can also use the `<NavLink unstable_viewTransition>` shorthand which will manage the hook usage for you and automatically add a `transitioning` class to the `<a>` during the transition:
476
+
477
+ ```css
478
+ a.transitioning img {
479
+ view-transition-name: "image-expand";
480
+ }
481
+ ```
482
+
483
+ ```jsx
484
+ <NavLink to={to} unstable_viewTransition>
485
+ <img src={src} alt={alt} />
486
+ </NavLink>
487
+ ```
488
+
489
+ For an example usage of View Transitions with React Router, check out [our fork](https://github.com/brophdawg11/react-router-records) of the [Astro Records](https://github.com/Charca/astro-records) demo.
490
+
491
+ For more information on using the View Transitions API, please refer to the [Smooth and simple transitions with the View Transitions API](https://developer.chrome.com/docs/web-platform/view-transitions/) guide from the Google Chrome team.
492
+
493
+ Please note, that because the `ViewTransition` API is a DOM API, we now export a specific `RouterProvider` from `react-router-dom` with this functionality. If you are importing `RouterProvider` from `react-router`, then it will not support view transitions. ([#10928](https://github.com/remix-run/react-router/pull/10928)
494
+
495
+ ### Patch Changes
496
+
497
+ - Log a warning and fail gracefully in `ScrollRestoration` when `sessionStorage` is unavailable ([#10848](https://github.com/remix-run/react-router/pull/10848))
498
+ - Updated dependencies:
499
+ - `@remix-run/router@1.10.0`
500
+ - `react-router@6.17.0`
501
+
502
+ ## 6.16.0
503
+
504
+ ### Minor Changes
505
+
506
+ - Updated dependencies:
507
+ - `@remix-run/router@1.9.0`
508
+ - `react-router@6.16.0`
509
+
510
+ ### Patch Changes
511
+
512
+ - Properly encode rendered URIs in server rendering to avoid hydration errors ([#10769](https://github.com/remix-run/react-router/pull/10769))
513
+
514
+ ## 6.15.0
515
+
516
+ ### Minor Changes
517
+
518
+ - Add's a new `redirectDocument()` function which allows users to specify that a redirect from a `loader`/`action` should trigger a document reload (via `window.location`) instead of attempting to navigate to the redirected location via React Router ([#10705](https://github.com/remix-run/react-router/pull/10705))
519
+
520
+ ### Patch Changes
521
+
522
+ - Fixes an edge-case affecting web extensions in Firefox that use `URLSearchParams` and the `useSearchParams` hook. ([#10620](https://github.com/remix-run/react-router/pull/10620))
523
+ - Do not include hash in `useFormAction()` for unspecified actions since it cannot be determined on the server and causes hydration issues ([#10758](https://github.com/remix-run/react-router/pull/10758))
524
+ - Reorder effects in `unstable_usePrompt` to avoid throwing an exception if the prompt is unblocked and a navigation is performed synchronously ([#10687](https://github.com/remix-run/react-router/pull/10687), [#10718](https://github.com/remix-run/react-router/pull/10718))
525
+ - Updated dependencies:
526
+ - `@remix-run/router@1.8.0`
527
+ - `react-router@6.15.0`
528
+
529
+ ## 6.14.2
530
+
531
+ ### Patch Changes
532
+
533
+ - Properly decode element id when emulating hash scrolling via `<ScrollRestoration>` ([#10682](https://github.com/remix-run/react-router/pull/10682))
534
+ - Add missing `<Form state>` prop to populate `history.state` on submission navigations ([#10630](https://github.com/remix-run/react-router/pull/10630))
535
+ - Support proper hydration of `Error` subclasses such as `ReferenceError`/`TypeError` ([#10633](https://github.com/remix-run/react-router/pull/10633))
536
+ - Updated dependencies:
537
+ - `@remix-run/router@1.7.2`
538
+ - `react-router@6.14.2`
539
+
540
+ ## 6.14.1
541
+
542
+ ### Patch Changes
543
+
544
+ - Updated dependencies:
545
+ - `react-router@6.14.1`
546
+ - `@remix-run/router@1.7.1`
547
+
548
+ ## 6.14.0
549
+
550
+ ### Minor Changes
551
+
552
+ - Add support for `application/json` and `text/plain` encodings for `useSubmit`/`fetcher.submit`. To reflect these additional types, `useNavigation`/`useFetcher` now also contain `navigation.json`/`navigation.text` and `fetcher.json`/`fetcher.text` which include the json/text submission if applicable ([#10413](https://github.com/remix-run/react-router/pull/10413))
553
+
554
+ ```jsx
555
+ // The default behavior will still serialize as FormData
556
+ function Component() {
557
+ let navigation = useNavigation();
558
+ let submit = useSubmit();
559
+ submit({ key: "value" }, { method: "post" });
560
+ // navigation.formEncType => "application/x-www-form-urlencoded"
561
+ // navigation.formData => FormData instance
562
+ }
563
+
564
+ async function action({ request }) {
565
+ // request.headers.get("Content-Type") => "application/x-www-form-urlencoded"
566
+ // await request.formData() => FormData instance
567
+ }
568
+ ```
569
+
570
+ ```js
571
+ // Opt-into JSON encoding with `encType: "application/json"`
572
+ function Component() {
573
+ let navigation = useNavigation();
574
+ let submit = useSubmit();
575
+ submit({ key: "value" }, { method: "post", encType: "application/json" });
576
+ // navigation.formEncType => "application/json"
577
+ // navigation.json => { key: "value" }
578
+ }
579
+
580
+ async function action({ request }) {
581
+ // request.headers.get("Content-Type") => "application/json"
582
+ // await request.json() => { key: "value" }
583
+ }
584
+ ```
585
+
586
+ ```js
587
+ // Opt-into text encoding with `encType: "text/plain"`
588
+ function Component() {
589
+ let navigation = useNavigation();
590
+ let submit = useSubmit();
591
+ submit("Text submission", { method: "post", encType: "text/plain" });
592
+ // navigation.formEncType => "text/plain"
593
+ // navigation.text => "Text submission"
594
+ }
595
+
596
+ async function action({ request }) {
597
+ // request.headers.get("Content-Type") => "text/plain"
598
+ // await request.text() => "Text submission"
599
+ }
600
+ ```
601
+
602
+ ### Patch Changes
603
+
604
+ - When submitting a form from a `submitter` element, prefer the built-in `new FormData(form, submitter)` instead of the previous manual approach in modern browsers (those that support the new `submitter` parameter) ([#9865](https://github.com/remix-run/react-router/pull/9865), [#10627](https://github.com/remix-run/react-router/pull/10627))
605
+ - 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
606
+ - If developers want full spec-compliant support for legacy browsers, they can use the `formdata-submitter-polyfill`
607
+ - Call `window.history.pushState/replaceState` before updating React Router state (instead of after) so that `window.location` matches `useLocation` during synchronous React 17 rendering ([#10448](https://github.com/remix-run/react-router/pull/10448))
608
+ - ⚠️ However, generally apps should not be relying on `window.location` and should always reference `useLocation` when possible, as `window.location` will not be in sync 100% of the time (due to `popstate` events, concurrent mode, etc.)
609
+ - Fix `tsc --skipLibCheck:false` issues on React 17 ([#10622](https://github.com/remix-run/react-router/pull/10622))
610
+ - Upgrade `typescript` to 5.1 ([#10581](https://github.com/remix-run/react-router/pull/10581))
611
+ - Updated dependencies:
612
+ - `react-router@6.14.0`
613
+ - `@remix-run/router@1.7.0`
614
+
615
+ ## 6.13.0
616
+
617
+ ### Minor Changes
618
+
619
+ - Move [`React.startTransition`](https://react.dev/reference/react/startTransition) usage behind a [future flag](https://reactrouter.com/v6/guides/api-development-strategy) to avoid issues with existing incompatible `Suspense` 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 of `startTransition` 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 a `useMemo`. ([#10596](https://github.com/remix-run/react-router/pull/10596))
620
+
621
+ Existing behavior will no longer include `React.startTransition`:
622
+
623
+ ```jsx
624
+ <BrowserRouter>
625
+ <Routes>{/*...*/}</Routes>
626
+ </BrowserRouter>
627
+
628
+ <RouterProvider router={router} />
629
+ ```
630
+
631
+ If you wish to enable `React.startTransition`, pass the future flag to your component:
632
+
633
+ ```jsx
634
+ <BrowserRouter future={{ v7_startTransition: true }}>
635
+ <Routes>{/*...*/}</Routes>
636
+ </BrowserRouter>
637
+
638
+ <RouterProvider router={router} future={{ v7_startTransition: true }}/>
639
+ ```
640
+
641
+ ### Patch Changes
642
+
643
+ - Work around webpack/terser `React.startTransition` minification bug in production mode ([#10588](https://github.com/remix-run/react-router/pull/10588))
644
+ - Updated dependencies:
645
+ - `react-router@6.13.0`
646
+
647
+ ## 6.12.1
648
+
649
+ > \[!WARNING]
650
+ > Please use version `6.13.0` or later instead of `6.12.1`. This version suffers from a `webpack`/`terser` minification issue resulting in invalid minified code in your resulting production bundles which can cause issues in your application. See [#10579](https://github.com/remix-run/react-router/issues/10579) for more details.
651
+
652
+ ### Patch Changes
653
+
654
+ - Adjust feature detection of `React.startTransition` to fix webpack + react 17 compilation error ([#10569](https://github.com/remix-run/react-router/pull/10569))
655
+ - Updated dependencies:
656
+ - `react-router@6.12.1`
657
+
658
+ ## 6.12.0
659
+
660
+ ### Minor Changes
661
+
662
+ - Wrap internal router state updates with `React.startTransition` if it exists ([#10438](https://github.com/remix-run/react-router/pull/10438))
663
+
664
+ ### Patch Changes
665
+
666
+ - Re-throw `DOMException` (`DataCloneError`) when attempting to perform a `PUSH` navigation with non-serializable state. ([#10427](https://github.com/remix-run/react-router/pull/10427))
667
+ - Updated dependencies:
668
+ - `@remix-run/router@1.6.3`
669
+ - `react-router@6.12.0`
670
+
671
+ ## 6.11.2
672
+
673
+ ### Patch Changes
674
+
675
+ - Export `SetURLSearchParams` type ([#10444](https://github.com/remix-run/react-router/pull/10444))
676
+ - Updated dependencies:
677
+ - `react-router@6.11.2`
678
+ - `@remix-run/router@1.6.2`
679
+
680
+ ## 6.11.1
681
+
682
+ ### Patch Changes
683
+
684
+ - Updated dependencies:
685
+ - `react-router@6.11.1`
686
+ - `@remix-run/router@1.6.1`
687
+
688
+ ## 6.11.0
689
+
690
+ ### Minor Changes
691
+
692
+ - Enable `basename` support in `useFetcher` ([#10336](https://github.com/remix-run/react-router/pull/10336))
693
+ - If you were previously working around this issue by manually prepending the `basename` then you will need to remove the manually prepended `basename` from your `fetcher` calls (`fetcher.load('/basename/route') -> fetcher.load('/route')`)
694
+
695
+ ### Patch Changes
696
+
697
+ - Fix inadvertent re-renders when using `Component` instead of `element` on a route definition ([#10287](https://github.com/remix-run/react-router/pull/10287))
698
+ - Fail gracefully on `<Link to="//">` and other invalid URL values ([#10367](https://github.com/remix-run/react-router/pull/10367))
699
+ - Switched from `useSyncExternalStore` to `useState` for internal `@remix-run/router` router state syncing in `<RouterProvider>`. We found some [subtle bugs](https://codesandbox.io/s/use-sync-external-store-loop-9g7b81) where router state updates got propagated _before_ other normal `useState` updates, which could lead to footguns in `useEffect` calls. ([#10377](https://github.com/remix-run/react-router/pull/10377), [#10409](https://github.com/remix-run/react-router/pull/10409))
700
+ - Add static prop to `StaticRouterProvider`'s internal `Router` component ([#10401](https://github.com/remix-run/react-router/pull/10401))
701
+ - When using a `RouterProvider`, `useNavigate`/`useSubmit`/`fetcher.submit` are now stable across location changes, since we can handle relative routing via the `@remix-run/router` instance and get rid of our dependence on `useLocation()`. When using `BrowserRouter`, these hooks remain unstable across location changes because they still rely on `useLocation()`. ([#10336](https://github.com/remix-run/react-router/pull/10336))
702
+ - Updated dependencies:
703
+ - `react-router@6.11.0`
704
+ - `@remix-run/router@1.6.0`
705
+
706
+ ## 6.10.0
707
+
708
+ ### Minor Changes
709
+
710
+ - Added support for [**Future Flags**](https://reactrouter.com/v6/guides/api-development-strategy) in React Router. The first flag being introduced is `future.v7_normalizeFormMethod` which will normalize the exposed `useNavigation()/useFetcher()` `formMethod` fields as uppercase HTTP methods to align with the `fetch()` behavior. ([#10207](https://github.com/remix-run/react-router/pull/10207))
711
+
712
+ - When `future.v7_normalizeFormMethod === false` (default v6 behavior),
713
+ - `useNavigation().formMethod` is lowercase
714
+ - `useFetcher().formMethod` is lowercase
715
+ - When `future.v7_normalizeFormMethod === true`:
716
+ - `useNavigation().formMethod` is uppercase
717
+ - `useFetcher().formMethod` is uppercase
718
+
719
+ ### Patch Changes
720
+
721
+ - Fix `createStaticHandler` to also check for `ErrorBoundary` on routes in addition to `errorElement` ([#10190](https://github.com/remix-run/react-router/pull/10190))
722
+ - Updated dependencies:
723
+ - `@remix-run/router@1.5.0`
724
+ - `react-router@6.10.0`
725
+
726
+ ## 6.9.0
727
+
728
+ ### Minor Changes
729
+
730
+ - React Router now supports an alternative way to define your route `element` and `errorElement` fields as React Components instead of React Elements. You can instead pass a React Component to the new `Component` and `ErrorBoundary` fields if you choose. There is no functional difference between the two, so use whichever approach you prefer 😀. You shouldn't be defining both, but if you do `Component`/`ErrorBoundary` will "win". ([#10045](https://github.com/remix-run/react-router/pull/10045))
731
+
732
+ **Example JSON Syntax**
733
+
734
+ ```jsx
735
+ // Both of these work the same:
736
+ const elementRoutes = [{
737
+ path: '/',
738
+ element: <Home />,
739
+ errorElement: <HomeError />,
740
+ }]
741
+
742
+ const componentRoutes = [{
743
+ path: '/',
744
+ Component: Home,
745
+ ErrorBoundary: HomeError,
746
+ }]
747
+
748
+ function Home() { ... }
749
+ function HomeError() { ... }
750
+ ```
751
+
752
+ **Example JSX Syntax**
753
+
754
+ ```jsx
755
+ // Both of these work the same:
756
+ const elementRoutes = createRoutesFromElements(
757
+ <Route path='/' element={<Home />} errorElement={<HomeError /> } />
758
+ );
759
+
760
+ const componentRoutes = createRoutesFromElements(
761
+ <Route path='/' Component={Home} ErrorBoundary={HomeError} />
762
+ );
763
+
764
+ function Home() { ... }
765
+ function HomeError() { ... }
766
+ ```
767
+
768
+ - **Introducing Lazy Route Modules!** ([#10045](https://github.com/remix-run/react-router/pull/10045))
769
+
770
+ In order to keep your application bundles small and support code-splitting of your routes, we've introduced a new `lazy()` route property. This is an async function that resolves the non-route-matching portions of your route definition (`loader`, `action`, `element`/`Component`, `errorElement`/`ErrorBoundary`, `shouldRevalidate`, `handle`).
771
+
772
+ Lazy routes are resolved on initial load and during the `loading` or `submitting` phase of a navigation or fetcher call. You cannot lazily define route-matching properties (`path`, `index`, `children`) since we only execute your lazy route functions after we've matched known routes.
773
+
774
+ Your `lazy` functions will typically return the result of a dynamic import.
775
+
776
+ ```jsx
777
+ // In this example, we assume most folks land on the homepage so we include that
778
+ // in our critical-path bundle, but then we lazily load modules for /a and /b so
779
+ // they don't load until the user navigates to those routes
780
+ let routes = createRoutesFromElements(
781
+ <Route path="/" element={<Layout />}>
782
+ <Route index element={<Home />} />
783
+ <Route path="a" lazy={() => import("./a")} />
784
+ <Route path="b" lazy={() => import("./b")} />
785
+ </Route>
786
+ );
787
+ ```
788
+
789
+ Then in your lazy route modules, export the properties you want defined for the route:
790
+
791
+ ```jsx
792
+ export async function loader({ request }) {
793
+ let data = await fetchData(request);
794
+ return json(data);
795
+ }
796
+
797
+ // Export a `Component` directly instead of needing to create a React Element from it
798
+ export function Component() {
799
+ let data = useLoaderData();
800
+
801
+ return (
802
+ <>
803
+ <h1>You made it!</h1>
804
+ <p>{data}</p>
805
+ </>
806
+ );
807
+ }
808
+
809
+ // Export an `ErrorBoundary` directly instead of needing to create a React Element from it
810
+ export function ErrorBoundary() {
811
+ let error = useRouteError();
812
+ return isRouteErrorResponse(error) ? (
813
+ <h1>
814
+ {error.status} {error.statusText}
815
+ </h1>
816
+ ) : (
817
+ <h1>{error.message || error}</h1>
818
+ );
819
+ }
820
+ ```
821
+
822
+ An example of this in action can be found in the [`examples/lazy-loading-router-provider`](https://github.com/remix-run/react-router/tree/main/examples/lazy-loading-router-provider) directory of the repository.
823
+
824
+ 🙌 Huge thanks to @rossipedia for the [Initial Proposal](https://github.com/remix-run/react-router/discussions/9826) and [POC Implementation](https://github.com/remix-run/react-router/pull/9830).
825
+
826
+ - Updated dependencies:
827
+ - `react-router@6.9.0`
828
+ - `@remix-run/router@1.4.0`
829
+
830
+ ## 6.8.2
831
+
832
+ ### Patch Changes
833
+
834
+ - Treat same-origin absolute URLs in `<Link to>` as external if they are outside of the router `basename` ([#10135](https://github.com/remix-run/react-router/pull/10135))
835
+ - Fix `useBlocker` to return `IDLE_BLOCKER` during SSR ([#10046](https://github.com/remix-run/react-router/pull/10046))
836
+ - Fix SSR of absolute `<Link to>` urls ([#10112](https://github.com/remix-run/react-router/pull/10112))
837
+ - Properly escape HTML characters in `StaticRouterProvider` serialized hydration data ([#10068](https://github.com/remix-run/react-router/pull/10068))
838
+ - Updated dependencies:
839
+ - `@remix-run/router@1.3.3`
840
+ - `react-router@6.8.2`
841
+
842
+ ## 6.8.1
843
+
844
+ ### Patch Changes
845
+
846
+ - Improved absolute url detection in `Link` component (now also supports `mailto:` urls) ([#9994](https://github.com/remix-run/react-router/pull/9994))
847
+ - Fix partial object (search or hash only) pathnames losing current path value ([#10029](https://github.com/remix-run/react-router/pull/10029))
848
+ - Updated dependencies:
849
+ - `react-router@6.8.1`
850
+ - `@remix-run/router@1.3.2`
851
+
852
+ ## 6.8.0
853
+
854
+ ### Minor Changes
855
+
856
+ - Support absolute URLs in `<Link to>`. If the URL is for the current origin, it will still do a client-side navigation. If the URL is for a different origin then it will do a fresh document request for the new origin. ([#9900](https://github.com/remix-run/react-router/pull/9900))
857
+
858
+ ```tsx
859
+ <Link to="https://neworigin.com/some/path"> {/* Document request */}
860
+ <Link to="//neworigin.com/some/path"> {/* Document request */}
861
+ <Link to="https://www.currentorigin.com/path"> {/* Client-side navigation */}
862
+ ```
863
+
864
+ ### Patch Changes
865
+
866
+ - Fix bug with search params removal via `useSearchParams` ([#9969](https://github.com/remix-run/react-router/pull/9969))
867
+ - Respect `preventScrollReset` on `<fetcher.Form>` ([#9963](https://github.com/remix-run/react-router/pull/9963))
868
+ - Fix navigation for hash routers on manual URL changes ([#9980](https://github.com/remix-run/react-router/pull/9980))
869
+ - Use `pagehide` instead of `beforeunload` for `<ScrollRestoration>`. This has better cross-browser support, specifically on Mobile Safari. ([#9945](https://github.com/remix-run/react-router/pull/9945))
870
+ - Updated dependencies:
871
+ - `@remix-run/router@1.3.1`
872
+ - `react-router@6.8.0`
873
+
874
+ ## 6.7.0
875
+
876
+ ### Minor Changes
877
+
878
+ - Add `unstable_useBlocker` hook for blocking navigations within the app's location origin ([#9709](https://github.com/remix-run/react-router/pull/9709))
879
+ - Add `unstable_usePrompt` hook for blocking navigations within the app's location origin ([#9932](https://github.com/remix-run/react-router/pull/9932))
880
+ - Add `preventScrollReset` prop to `<Form>` ([#9886](https://github.com/remix-run/react-router/pull/9886))
881
+
882
+ ### Patch Changes
883
+
884
+ - Added pass-through event listener options argument to `useBeforeUnload` ([#9709](https://github.com/remix-run/react-router/pull/9709))
885
+ - Streamline jsdom bug workaround in tests ([#9824](https://github.com/remix-run/react-router/pull/9824))
886
+ - Updated dependencies:
887
+ - `@remix-run/router@1.3.0`
888
+ - `react-router@6.7.0`
889
+
890
+ ## 6.6.2
891
+
892
+ ### Patch Changes
893
+
894
+ - Ensure `useId` consistency during SSR ([#9805](https://github.com/remix-run/react-router/pull/9805))
895
+ - Updated dependencies:
896
+ - `react-router@6.6.2`
897
+
898
+ ## 6.6.1
899
+
900
+ ### Patch Changes
901
+
902
+ - Updated dependencies:
903
+ - `@remix-run/router@1.2.1`
904
+ - `react-router@6.6.1`
905
+
906
+ ## 6.6.0
907
+
908
+ ### Minor Changes
909
+
910
+ - Add `useBeforeUnload()` hook ([#9664](https://github.com/remix-run/react-router/pull/9664))
911
+ - Remove `unstable_` prefix from `createStaticHandler`/`createStaticRouter`/`StaticRouterProvider` ([#9738](https://github.com/remix-run/react-router/pull/9738))
912
+
913
+ ### Patch Changes
914
+
915
+ - Proper hydration of `Error` objects from `StaticRouterProvider` ([#9664](https://github.com/remix-run/react-router/pull/9664))
916
+ - Support uppercase `<Form method>` and `useSubmit` method values ([#9664](https://github.com/remix-run/react-router/pull/9664))
917
+ - Skip initial scroll restoration for SSR apps with `hydrationData` ([#9664](https://github.com/remix-run/react-router/pull/9664))
918
+ - Fix `<button formmethod>` form submission overriddes ([#9664](https://github.com/remix-run/react-router/pull/9664))
919
+ - Updated dependencies:
920
+ - `@remix-run/router@1.2.0`
921
+ - `react-router@6.6.0`
922
+
923
+ ## 6.5.0
924
+
925
+ ### Patch Changes
926
+
927
+ - Updated dependencies:
928
+ - `react-router@6.5.0`
929
+ - `@remix-run/router@1.1.0`
930
+
931
+ ## 6.4.5
932
+
933
+ ### Patch Changes
934
+
935
+ - Updated dependencies:
936
+ - `@remix-run/router@1.0.5`
937
+ - `react-router@6.4.5`
938
+
939
+ ## 6.4.4
940
+
941
+ ### Patch Changes
942
+
943
+ - Fix issues with encoded characters in `NavLink` and descendant `<Routes>` ([#9589](https://github.com/remix-run/react-router/pull/9589), [#9647](https://github.com/remix-run/react-router/pull/9647))
944
+ - Properly serialize/deserialize `ErrorResponse` instances when using built-in hydration ([#9593](https://github.com/remix-run/react-router/pull/9593))
945
+ - Support `basename` in static data routers ([#9591](https://github.com/remix-run/react-router/pull/9591))
946
+ - Updated dependencies:
947
+ - `@remix-run/router@1.0.4`
948
+ - `react-router@6.4.4`
949
+
950
+ ## 6.4.3
951
+
952
+ ### Patch Changes
953
+
954
+ - Fix hrefs generated for `createHashRouter` ([#9409](https://github.com/remix-run/react-router/pull/9409))
955
+ - fix encoding/matching issues with special chars ([#9477](https://github.com/remix-run/react-router/pull/9477), [#9496](https://github.com/remix-run/react-router/pull/9496))
956
+ - Properly support `index` routes with a `path` in `useResolvedPath` ([#9486](https://github.com/remix-run/react-router/pull/9486))
957
+ - Respect `relative=path` prop on `NavLink` ([#9453](https://github.com/remix-run/react-router/pull/9453))
958
+ - Fix `NavLink` behavior for root urls ([#9497](https://github.com/remix-run/react-router/pull/9497))
959
+ - Updated dependencies:
960
+ - `@remix-run/router@1.0.3`
961
+ - `react-router@6.4.3`
962
+
963
+ ## 6.4.2
964
+
965
+ ### Patch Changes
966
+
967
+ - Respect `basename` in `useFormAction` ([#9352](https://github.com/remix-run/react-router/pull/9352))
968
+ - Enhance console error messages for invalid usage of data router hooks ([#9311](https://github.com/remix-run/react-router/pull/9311))
969
+ - If an index route has children, it will result in a runtime error. We have strengthened our `RouteObject`/`RouteProps` types to surface the error in TypeScript. ([#9366](https://github.com/remix-run/react-router/pull/9366))
970
+ - Updated dependencies:
971
+ - `react-router@6.4.2`
972
+ - `@remix-run/router@1.0.2`
973
+
974
+ ## 6.4.1
975
+
976
+ ### Patch Changes
977
+
978
+ - Updated dependencies:
979
+ - `react-router@6.4.1`
980
+ - `@remix-run/router@1.0.1`
981
+
982
+ ## 6.4.0
983
+
984
+ Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs over from Remix. Here's a quick high level overview, but it's recommended you go check out the [docs](https://reactrouter.com), especially the [feature overview](https://reactrouter.com/en/6.4.0/start/overview) and the [tutorial](https://reactrouter.com/en/6.4.0/start/tutorial).
985
+
986
+ **New APIs**
987
+
988
+ - Create your router with `createMemoryRouter`/`createBrowserRouter`/`createHashRouter`
989
+ - Render your router with `<RouterProvider>`
990
+ - Load data with a Route `loader` and mutate with a Route `action`
991
+ - Handle errors with Route `errorElement`
992
+ - Submit data with the new `<Form>` component
993
+ - Perform in-page data loads and mutations with `useFetcher()`
994
+ - Defer non-critical data with `defer` and `Await`
995
+ - Manage scroll position with `<ScrollRestoration>`
996
+
997
+ **New Features**
998
+
999
+ - Perform path-relative navigations with `<Link relative="path">` (#9160)
1000
+
1001
+ **Bug Fixes**
1002
+
1003
+ - Path resolution is now trailing slash agnostic (#8861)
1004
+ - `useLocation` returns the scoped location inside a `<Routes location>` component (#9094)
1005
+ - respect the `<Link replace>` prop if it is defined (#8779)
1006
+
1007
+ **Updated Dependencies**
1008
+
1009
+ - `react-router@6.4.0`