Skip to content

Commit 04ea20f

Browse files
committed
chore: fixed the warning for router v6
1 parent f523a3b commit 04ea20f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ const Page = () => {
1616
}}
1717
>
1818
<React.Suspense fallback={<Loading />}>
19-
<RouterProvider router={router} />
19+
<RouterProvider
20+
router={router}
21+
future={{
22+
v7_startTransition: true,
23+
}}
24+
/>
2025
</React.Suspense>
2126
</ConfigProvider>
2227
);

src/router.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,12 @@ export const router = createBrowserRouter(
5757
],
5858
{
5959
basename: '/',
60+
future: {
61+
v7_fetcherPersist: true,
62+
v7_normalizeFormMethod: true,
63+
v7_partialHydration: true,
64+
v7_relativeSplatPath: true,
65+
v7_skipActionErrorRevalidation: true,
66+
},
6067
},
6168
);

0 commit comments

Comments
 (0)