Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 821 Bytes

File metadata and controls

41 lines (28 loc) · 821 Bytes

link-to-props

Usage

npx react-router-v6-codemods link-to-props path/of/files/ or/some**/*glob.js

# or

yarn global add react-router-v6-codemods
react-router-v6-codemods link-to-props path/of/files/ or/some**/*glob.js

Local Usage

node ./bin/cli.js link-to-props path/of/files/ or/some**/*glob.js

Input / Output


basic

Input (basic.input.js):

<Link to={{ pathname: '/home', state: state }} />;

Output (basic.output.js):

<Link to="/home" state={state} />;