Skip to content

Commit 8febc79

Browse files
authored
RR 6.24 and turn on v7 future flags (#2297)
RR 6.24 and turn on all v7 flags
1 parent 0d28797 commit 8febc79

File tree

3 files changed

+43
-29
lines changed

3 files changed

+43
-29
lines changed

app/main.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,13 @@ function render() {
4141
// This means RR is best thought of as an external store that runs
4242
// independently of the React render lifecycle.
4343
const router = createBrowserRouter(routes, {
44-
// https://reactrouter.com/en/main/guides/api-development-strategy#current-future-flags
45-
future: { v7_normalizeFormMethod: true },
44+
// https://reactrouter.com/en/6.24.0/upgrading/future
45+
future: {
46+
v7_fetcherPersist: true,
47+
v7_normalizeFormMethod: true,
48+
v7_partialHydration: true,
49+
v7_relativeSplatPath: true,
50+
},
4651
})
4752

4853
root.render(
@@ -52,7 +57,13 @@ function render() {
5257
<ConfirmActionModal />
5358
<SkipLink id="skip-nav" />
5459
<ReduceMotion />
55-
<RouterProvider router={router} />
60+
<RouterProvider
61+
router={router}
62+
// this breaks the scroll restore test. turn it on after we change
63+
// the layout so the whole page scrolls and switch back to RR's
64+
// built in useScrollRestoration
65+
// future={{ v7_startTransition: true }}
66+
/>
5667
</ErrorBoundary>
5768
{/* <ReactQueryDevtools initialIsOpen={false} /> */}
5869
</QueryClientProvider>

package-lock.json

Lines changed: 28 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"react-hook-form": "^7.51.4",
6464
"react-is": "^18.3.1",
6565
"react-merge-refs": "^2.1.1",
66-
"react-router-dom": "^6.23.0",
66+
"react-router-dom": "^6.24.0",
6767
"react-stately": "^3.31.0",
6868
"recharts": "^2.12.6",
6969
"remeda": "^2.0.3",

0 commit comments

Comments
 (0)