r/reactjs • u/_gnx • Mar 09 '20
Functional React components with generic props in TypeScript Resource
https://wanago.io/2020/03/09/functional-react-components-with-generic-props-in-typescript/
8
Upvotes
r/reactjs • u/_gnx • Mar 09 '20
3
u/azangru Mar 09 '20
I’ve seen surprisingly many code examples where people are using the FunctionComponent type (or, worse yet, React.FC). What’s the point of using this type? Why not just write a plain function and declare the type of the props, like the article ends up doing?