Replace ReactDOM.hydrate with hydrateRoot
Recipe ID
org.openrewrite.react.19.replace-reactdom-hydrateArtifact@openrewrite/recipes-reactMigrates from the legacy ReactDOM.hydrate() API to the hydrateRoot() API from react-dom/client.
Single recipeProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.react.19.replace-reactdom-hydrateIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-react