Codemod verified
Regularly tested and maintained by our engineers and codemod expert community.
migration
by![](https://cdn.sanity.io/images/aho0e32c/production/61b763a05f41a7aea0b3b3265ff0fc83534ef28c-20x21.svg?w=20&fit=max&auto=format)
Codemod
React/React To React Dom
Last update
May 29, 2024
Updates code for the split of the react
and react-dom
packages (e.g.,
React.render
to ReactDOM.render
).
It looks for require('react')
and replaces the appropriate property accesses using require('react-dom'
. It does not support ES6 modules or other non-CommonJS systems. We recommend performing
the findDOMNode
conversion first.
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community