mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Add findDOMNode transform
This commit is contained in:
@@ -11,6 +11,17 @@ APIs.
|
||||
* Use the `-d` option for a dry-run and use `-p` to print the output
|
||||
for comparison
|
||||
|
||||
### Included Scripts
|
||||
|
||||
`findDOMNode.js` updates `this.getDOMNode()` or `this.refs.foo.getDOMNode()`
|
||||
calls inside of `React.createClass` components to `React.findDOMNode(foo)`. Note
|
||||
that it will only look at code inside of `React.createClass` calls and only
|
||||
update calls on the component instance or its refs. You can use this script to
|
||||
update most calls to `getDOMNode` and then manually go through the remaining
|
||||
calls.
|
||||
|
||||
* `react-codemod findDOMNode <file>`
|
||||
|
||||
### Recast Options
|
||||
|
||||
Options to [recast](https://github.com/benjamn/recast)'s printer can be provided
|
||||
|
||||
Reference in New Issue
Block a user