Use case
Framework
Owner
- Liz/React Router/Headers Export- This is a codemod that automatically adds the required - headersexport to pages using- authenticate.admin().
- React Router/4/Move Hoc To Global Scope- Moves HOC calls to the global scope - Codemod verified- Regularly tested and maintained by our engineers and codemod expert community 
- Remix/2/React Router/Upgrade- This codemod automates most of the manual steps outlined in the Remix to React Router upgrade guide. 
- React Router/6/UseHistory To UseNavigate- This codemod migrates - useHistoryto- useNavigatein React Router codebases. It replaces- useHistoryimports and updates all instances of- history.push,- history.replace,- go,- goBack, and- goForwardto align with the- useNavigateAPI.
- React Router/6/Switch To Routes- This codemod updates - Switchcomponents to- Routesin React Router, in line with React Router v6 and newer. It also adjusts the imports, replacing- Switchwith- Routesin- react-router-domimport statements.
- React Router/6/Migrate StaticRouter Import- This codemod updates imports of - StaticRouterto use the- react-router-dom/serverpackage instead of- react-router-dom, in line with updated React Router requirements.
- React Router/6/Seperate Link State Prop- This codemod simplifies the - Linkcomponent by transforming its- toprop from an object with a- pathnameto a string. It removes the unnecessary object wrapper around the- pathname, maintaining the- stateprop as is.
- React Router/6/Replace UseRouteMatchWithUseMatch- This codemod updates - useRouteMatchcalls to the newer- useMatchfunction in- react-router-dom. It also adjusts any arguments passed to- useRouteMatch, changing- strictto- endand- sensitiveto- caseSensitive. Additionally, it ensures that imports are updated to reflect the removal of- useRouteMatch.
- React Router/6/Reorder Matchpath Args- This codemod reorders the arguments in the - matchPathfunction calls. It switches the position of the string path and the second callback argument, improving consistency and readability.
- React Router/6/Remove ActiveStyleprops- This codemod updates - NavLinkcomponents that use separate- styleand- activeStyleprops to the modern- isActivefunction in- react-router-dom. It simplifies the logic by combining the two props into a single- styleprop with conditional styling.
- React Router/6/Update Relative Links- This codemod modernizes - Routeand- Linkcomponents in React Router by:- Removing the deprecated exactprop fromRoute.
- Updating Routeto use theelementprop.
- Rewriting dynamic LinkandRoutepaths that use template literals like${match.url}and${match.path}.
 
- Removing the deprecated 
- React Router/5.1/Redirect To Navigate- This codemod updates deprecated - Redirectcomponents from- react-router-domto the modern- NavigateAPI. It also updates the imports by replacing- Redirectwith- Navigate.
- React Router/6/React Router Config To Use Routes- This codemod helps update code that uses - react-router-configto the modern- useRoutesAPI from- react-router-dom. It removes- renderRoutesfrom imports and replaces it with- useRoutes. Manual adjustments might be required after running the codemod, especially if other customizations exist in your routing logic.
- React Router/6/Navlink Exact To End- This codemod replaces the deprecated - exactprop in- NavLinkwith the modern- endprop. React Router v6 and beyond use- endto indicate that the path should match exactly, making this a necessary update for compatibility with newer versions.
- React Router/5.1/Component Render To Children- This codemod transforms - Routecomponents using- renderand- componentprops into JSX with nested children.
- React Router/7/Update Imports- In v7 the react-router and react-router-dom packages are combined so this codemod import everything directly from "react-router" except for the RouterProvider exception. 
- React Router/7/Migration Recipe- This codemods designed to facilitate the migration of your project from React Router to version 7. Each codemod targets specific changes and improvements introduced in React Router v7, ensuring a smoother transition. 
- React Router/7/Add V7 SkipActionStatusRevalidation Flag- This transformation adds the necessary configuration to enable v7 features, specifically the v7_skipActionStatusRevalidation flag. 
- React Router/7/Add V7 PartialHydration Flag- This transformation adds the necessary configuration to enable v7 features, specifically the v7_partialHydration_Flag flags 
- React Router/7/Add V7 NormalizeFormMethod- This transformation adds the necessary configuration to enable v7 features, specifically adds the v7_normalizeFormMethod