Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajasegar/react-router-v6-codemods
Codemods to migrate to react-router v6
https://github.com/rajasegar/react-router-v6-codemods
codemod codemods react react-router
Last synced: 3 months ago
JSON representation
Codemods to migrate to react-router v6
- Host: GitHub
- URL: https://github.com/rajasegar/react-router-v6-codemods
- Owner: rajasegar
- License: mit
- Created: 2023-01-05T11:17:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-09T11:26:51.000Z (about 2 years ago)
- Last Synced: 2024-10-10T17:19:55.411Z (3 months ago)
- Topics: codemod, codemods, react, react-router
- Language: JavaScript
- Homepage:
- Size: 825 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-codemods - react-router-v6-codemods - Codemods for migrating react-router from v5 to v6. (Libraries / react-router)
README
# react-router-v6-codemods
![Build and Deploy](https://github.com/rajasegar/react-router-v6-codemods/workflows/CI/badge.svg)
[![npm version](http://img.shields.io/npm/v/react-router-v6-codemods.svg?style=flat)](https://npmjs.org/package/react-router-v6-codemods 'View this project on npm')A collection of codemods for react-router for upgrading to v6.
## Usage
To run a specific codemod from this project, you would run the following:
```
npx react-router-v6-codemods path/of/files/ or/some**/*glob.js# or
yarn global add react-router-v6-codemods
react-router-v6-codemods path/of/files/ or/some**/*glob.js
```## Local Usage
```
node ./bin/cli.js path/of/files/ or/some**/*glob.js
```## Transforms
* [compat-route](transforms/compat-route/README.md)
* [compat-router](transforms/compat-router/README.md)
* [link-to-props](transforms/link-to-props/README.md)
* [match-path-arguments](transforms/match-path-arguments/README.md)
* [navlink-exact-end](transforms/navlink-exact-end/README.md)
* [redirect-to-navigate](transforms/redirect-to-navigate/README.md)
* [remove-active-classname](transforms/remove-active-classname/README.md)
* [remove-active-style](transforms/remove-active-style/README.md)
* [remove-compat-router](transforms/remove-compat-router/README.md)
* [remove-go-hooks](transforms/remove-go-hooks/README.md)
* [remove-redirect-inside-switch](transforms/remove-redirect-inside-switch/README.md)
* [rename-compat-imports](transforms/rename-compat-imports/README.md)
* [static-router-imports](transforms/static-router-imports/README.md)
* [use-location](transforms/use-location/README.md)
* [use-navigate](transforms/use-navigate/README.md)
* [use-params](transforms/use-params/README.md)
* [use-route-match](transforms/use-route-match/README.md)## Contributing
### Installation
* clone the repo
* change into the repo directory
* `yarn`### Running tests
* `yarn test`
### Update Documentation
* `yarn update-docs`