Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 887 Bytes

File metadata and controls

49 lines (36 loc) · 887 Bytes

index-route

Usage

npx react-router-v4-codemods index-route path/of/files/ or/some**/*glob.js

# or

yarn global add react-router-v4-codemods
react-router-v4-codemods index-route path/of/files/ or/some**/*glob.js

Local Usage

node ./bin/cli.js index-route path/of/files/ or/some**/*glob.js

Input / Output


basic

Input (basic.input.js):

const App = () => (
  <div>
    <IndexRoute component={Home} />;
  </div>
);

Output (basic.output.js):

const App = () => (
  <div>
    <Route exact path="/" component={Home} />;
  </div>
);