Skip to content

Commit

Permalink
Enable react-router future flags
Browse files Browse the repository at this point in the history
This is to prepare for react-router v7
  • Loading branch information
pvcnt committed Nov 2, 2024
1 parent eb37883 commit 9d2e5d2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions apps/webapp/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Settings from "./routes/settings.tsx";
import Stars from "./routes/stars.tsx";
import "./main.scss";

const router = createBrowserRouter([
const routes = [
{
path: "/",
element: <App />,
Expand All @@ -37,12 +37,20 @@ const router = createBrowserRouter([
},
],
},
]);
];
const router = createBrowserRouter(routes, {
future: {
v7_relativeSplatPath: true,
v7_fetcherPersist: true,
v7_normalizeFormMethod: true,
v7_partialHydration: true,
}
});

ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<BlueprintProvider>
<RouterProvider router={router} />
<RouterProvider router={router} future={{v7_startTransition: true}} />
</BlueprintProvider>
</React.StrictMode>,
);

0 comments on commit 9d2e5d2

Please sign in to comment.