Skip to content

Commit 9f27b4a

Browse files
committed
Add linkage to codemods. 🔬
1 parent a1e5e74 commit 9f27b4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

upgrade-guides/v2.0.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ We have done our best to provide backwards compatibility with deprecated APIs. I
2424

2525
The deprecation warnings should also lead you to the relevant part of this document. If one doesn't, please open a pull request with a fix. Also, if any part of this document could be improved, please let us know how. Confound it, our bias is often inescapable!
2626

27+
### Upgrade with Codemods
28+
29+
Using a tool called [jscodeshift](https://github.com/facebook/jscodeshift), we have made available some codemods for upgrading your code to the new APIs automatically: https://github.com/rackt/rackt-codemod
30+
31+
A codemod is much like Babel, but instead of converting your ES2015 code to ES5 compatible syntax, it does a limited set of transformations on function names, arguments, common patterns and more. One way to think of jscodeshift (the underlying tool) is "jQuery for code". These codemods aren't bulletproof, so be sure to test your code after you run them. But they can help with upgrading a large codebase to remove deprecation warnings you're now triggering.
32+
2733
## Using `history` with `Router`
2834

2935
### History singletons provided

0 commit comments

Comments
 (0)