• React Router/6/UseHistory To UseNavigate

    This codemod migrates useHistory to useNavigate in React Router codebases. It replaces useHistory imports and updates all instances of history.push, history.replace, go, goBack, and goForward to align with the useNavigate API.

    by@manishjha-04
  • React Router/6/Switch To Routes

    This codemod updates Switch components to Routes in React Router, in line with React Router v6 and newer. It also adjusts the imports, replacing Switch with Routes in react-router-dom import statements.

    by@manishjha-04
  • React Router/6/Migrate StaticRouter Import

    This codemod updates imports of StaticRouter to use the react-router-dom/server package instead of react-router-dom, in line with updated React Router requirements.

    by@manishjha-04
  • React Router/6/Seperate Link State Prop

    This codemod simplifies the Link component by transforming its to prop from an object with a pathname to a string. It removes the unnecessary object wrapper around the pathname, maintaining the state prop as is.

    by@manishjha-04
  • React Router/6/Replace UseRouteMatchWithUseMatch

    This codemod updates useRouteMatch calls to the newer useMatch function in react-router-dom. It also adjusts any arguments passed to useRouteMatch, changing strict to end and sensitive to caseSensitive. Additionally, it ensures that imports are updated to reflect the removal of useRouteMatch.

    by@manishjha-04
  • React Router/6/Reorder Matchpath Args

    This codemod reorders the arguments in the matchPath function calls. It switches the position of the string path and the second callback argument, improving consistency and readability.

    by@manishjha-04
  • React Router/6/Remove ActiveStyleprops

    This codemod updates NavLink components that use separate style and activeStyle props to the modern isActive function in react-router-dom. It simplifies the logic by combining the two props into a single style prop with conditional styling.

    by@manishjha-04
  • React Router/6/Update Relative Links

    This codemod modernizes Route and Link components in React Router by:

    1. Removing the deprecated exact prop from Route.
    2. Updating Route to use the element prop.
    3. Rewriting dynamic Link and Route paths that use template literals like ${match.url} and ${match.path}.
    by@manishjha-04
  • React Router/5.1/Redirect To Navigate

    This codemod updates deprecated Redirect components from react-router-dom to the modern Navigate API. It also updates the imports by replacing Redirect with Navigate.

    by@manishjha-04
  • React Router/6/React Router Config To Use Routes

    This codemod helps update code that uses react-router-config to the modern useRoutes API from react-router-dom. It removes renderRoutes from imports and replaces it with useRoutes. Manual adjustments might be required after running the codemod, especially if other customizations exist in your routing logic.

    by@manishjha-04
  • React Router/6/Navlink Exact To End

    This codemod replaces the deprecated exact prop in NavLink with the modern end prop. React Router v6 and beyond use end to indicate that the path should match exactly, making this a necessary update for compatibility with newer versions.

    by@manishjha-04
  • React Router/5.1/Component Render To Children

    This codemod transforms Route components using render and component props into JSX with nested children.

    by@manishjha-04
  • Ethers/6/Contracts/Other Method Operations

    This codemod transforms some of the other method operations that are present in Contracts class of ethers.

  • Ethers/6/Contracts/Ambiguous Methods

    In v5, in the case of an ambiguous method, it was necessary to look up a method by its canonical normalized signature. In v6 the signature does not need to be normalized and the Typed API provides a cleaner way to access the desired method.

  • Ethers/6/Utilities

    This codemod does tranformation based on changes in the utils in ethers.js

    by@yugal41735
  • Ethers/6/Importing

    This codemod helps in tranformation, related to some import packages.

    by@yugal41735
  • Ethers/6/Providers

    In addition to all the ethers.providers.* being moved to ethers.*, the biggest change developers need to keep in mind is that Web3Provider (which historically was used to wrap link-web3 providers) is now called BrowserProvider which is designed to wrap EIP-1193 providers, which is the standard that both modern Web3.js and injected providers offer.

    by@yugal41735
  • Ethers/Big Numbers

    This codemod migrates BigNumber in v5 to BigInt in v6 in ethers.js library. It also changes the syntax for addition, and checking equality according to v6.