mirror of
https://github.com/facebook/react.git
synced 2026-02-26 04:24:58 +00:00
react-codemod
This repository contains a collection of codemod scripts based on JSCodeshift that help update React APIs.
Setup & Run
npm install -g react-codemodreact-codemod <codemod-script> <file>- Use the
-doption for a dry-run and use-pto print the output for comparison
Recast Options
Options to recast's printer can be provided
through the printOptions command line argument
react-codemod class <file> --printOptions='{"quote":"double"}'