React Router/7/Add V7 StartTransition Flag

/icons/calendar.svg

Last update

Oct 7, 2024

This transformation adds the necessary configuration to enable v7 features, specifically the v7_startTransition flags. It affects , , and createBrowserRouter configurations.

Before

<BrowserRouter>
{/* Routes */}
</BrowserRouter>

After

<BrowserRouter
future={{
v7_startTransition: true,
}}
>
{/* Routes */}
</BrowserRouter>

Before

<RouterProvider router={router} />;

After

<RouterProvider
future={{
v7_startTransition: true,
}}
router={router}
/>;

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now