Use case
Framework
Owner
React Router/6/UseHistory To UseNavigate
This codemod migrates
useHistory
touseNavigate
in React Router codebases. It replacesuseHistory
imports and updates all instances ofhistory.push
,history.replace
,go
,goBack
, andgoForward
to align with theuseNavigate
API.React Router/6/Switch To Routes
This codemod updates
Switch
components toRoutes
in React Router, in line with React Router v6 and newer. It also adjusts the imports, replacingSwitch
withRoutes
inreact-router-dom
import statements.React Router/6/Migrate StaticRouter Import
This codemod updates imports of
StaticRouter
to use thereact-router-dom/server
package instead ofreact-router-dom
, in line with updated React Router requirements.React Router/6/Replace UseRouteMatchWithUseMatch
This codemod updates
useRouteMatch
calls to the neweruseMatch
function inreact-router-dom
. It also adjusts any arguments passed touseRouteMatch
, changingstrict
toend
andsensitive
tocaseSensitive
. Additionally, it ensures that imports are updated to reflect the removal ofuseRouteMatch
.React Router/6/Remove ActiveStyleprops
This codemod updates
NavLink
components that use separatestyle
andactiveStyle
props to the modernisActive
function inreact-router-dom
. It simplifies the logic by combining the two props into a singlestyle
prop with conditional styling.React Router/6/Update Relative Links
This codemod modernizes
Route
andLink
components in React Router by:- Removing the deprecated
exact
prop fromRoute
. - Updating
Route
to use theelement
prop. - Rewriting dynamic
Link
andRoute
paths that use template literals like${match.url}
and${match.path}
.
- Removing the deprecated
React Router/5.1/Redirect To Navigate
This codemod updates deprecated
Redirect
components fromreact-router-dom
to the modernNavigate
API. It also updates the imports by replacingRedirect
withNavigate
.React Router/6/React Router Config To Use Routes
This codemod helps update code that uses
react-router-config
to the modernuseRoutes
API fromreact-router-dom
. It removesrenderRoutes
from imports and replaces it withuseRoutes
. 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
exact
prop inNavLink
with the modernend
prop. React Router v6 and beyond useend
to indicate that the path should match exactly, making this a necessary update for compatibility with newer versions.ChakraUI/V3/Update Chakra Provider
- Updates the ChakraProvider import from @chakra-ui/react
- Renames the theme prop to value to match the new system-based theming approach
ChakraUI/V3/Refactor Custom Theme
- Replaces extendTheme with createSystem and defaultConfig.
- Updates your theme object to fit the new structure required by Chakra UI.
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.
Webpack To Rspack/Migration Recipe
This recipe is a set of codemods that will help migrate from webpack to rspack.
Webpack To Rspack/Migrate Update Babel Loader To Swc Loader
Using builtin:swc-loader offers better performance compared to the babel-loader and the external swc-loader, as it avoids frequent communication between JavaScript and Rust.
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/Relative Links
This transformation updates elements within route trees to include an extra relative segment. This ensures that links continue to point to the correct locations after the route structure changes.
React Router/7/Route Wildcard To Nested
This transformation updates the routing structure for multi-segment splat paths. It affects both createBrowserRouter configurations and components.
React Router/7/Form Methods Post Get To Uppercase
This transformation updates formMethod checks to use uppercase HTTP methods.
Styledictionary/4/Hook Api Filters
This codemod updates registered filters to be placed inside the
hooks.filters
property, instead offilter
. Note the shift from the singular to the plural form in this update.Styledictionary/4/Logging
This codemod updates the logging system to be more configurable, as detailed in the Logging docs. You can now customize the verbosity of logs and silence warnings and success logs, in addition to the previous option of setting
log: 'error'
to change the default behavior to throw warnings as errors.