Change a React type

Proprietary

Renames a type exported by react to another react type, keeping its type arguments, through named, namespace, default and type-only imports, import('react') types, the React global and re-exports. Only references to React's own type are renamed.

org.openrewrite.react.change-react-type

Required

The react type to rename.

The react type to rename it to.

mod run . --recipe=org.openrewrite.react.change-react-type \ -P oldTypeName=SFC \ -P newTypeName=FC

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