Mmanishjha-04

react-router/6/remove-activeStyleprops

No description available

react-routermigrationv6
Public
0 executions
Run locally
npx codemod react-router/6/remove-activeStyleprops
Documentation

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.

Before

tsx

After

tsx

This makes the component more concise and aligns it with the newer API for conditional styles based on the isActive property.

Ready to contribute?

Build your own codemod and share it with the community.