Mmanishjha-04

react-router/6/reorder-matchpath-args

No description available

react-routermigrationv6
Public
0 executions

Run locally

npx codemod 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.

Before

tsx

After

tsx

This change ensures that the string path is now the second argument, following the newer convention for using matchPath.

Ready to contribute?

Build your own codemod and share it with the community.