← All recipes
Moderne licensed

Remove ReactDOM.render callback argument

Recipe IDorg.openrewrite.react.18.replace-render-callbackArtifact@openrewrite/recipes-react

Removes the third callback argument from ReactDOM.render(element, container, callback) calls. Callbacks are not supported in React 18's createRoot API.

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.18.replace-render-callback

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-react