Registry
M

react-router/7/add_v7_startTransition_Flag

No description available

manishjha-04984 executions

  • Legacy
  • react-router
  • migration
  • v7
Connect a repo
npx codemod react-router/7/add_v7_startTransition_Flag

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

Before

ts


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

After

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

Before

ts
<RouterProvider router={router} />;

After

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

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.