This codemod removes React.FC, React.FunctionComponent and React.SFC and replaces the Props as the type of the unique argument in the component definition.
This codemod supports:
- Inline defined props.
- Generics.
- Props defined with intersection.
- Component modules defined using intersection.
- Regular named functions.
- Functions that accept a component definition.
- Using FC, FunctionComponent and SFC as a named export.
Before:
jsx
After:
tsx