瀏覽代碼

🔧 chore(router): enable React Router v7 future flags to suppress warnings

Add `future` prop to `BrowserRouter` in `web/src/index.js` with
`v7_startTransition` and `v7_relativeSplatPath` turned on.
This opts the app into upcoming React Router v7 behavior, removes
console warnings, and readies the codebase for a smoother future upgrade.

No runtime behavior changes; developer-experience improvement only.
t0ng7u 8 月之前
父節點
當前提交
42a8d3e3dc
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      web/src/index.js

+ 6 - 1
web/src/index.js

@@ -17,7 +17,12 @@ root.render(
   <React.StrictMode>
     <StatusProvider>
       <UserProvider>
-        <BrowserRouter>
+        <BrowserRouter
+          future={{
+            v7_startTransition: true,
+            v7_relativeSplatPath: true,
+          }}
+        >
           <ThemeProvider>
             <PageLayout />
           </ThemeProvider>