gndelia / codemod-replace-react-fc-typescript

jscodeshift's codemod to replace React.FC when using React with Typescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add option to add children to props

gndelia opened this issue · comments

The current behaviour removes React.FC from the component declaration, which has an implicit definition of children, leaving its definition to be set manually in each case. An option could be set to forcefully add { children?: React.ReactNode } as props, which are the value that React.FC offers. It should be an opt-in option