Replace React.createFactory with React.createElement

Proprietary

Replaces React.createFactory(type)(props, children) with React.createElement(type, props, children). React.createFactory was deprecated in React 16.13 and removed in React 19. Only a factory that is called right away is replaced.

org.openrewrite.react.19.replace-create-factory
mod run . --recipe=org.openrewrite.react.19.replace-create-factory

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.