DEV Community

Discussion on: Create a React / TypeScript Generic Component

Collapse
 
fabiobiondi profile image
Fabio Biondi

yes, there is often an alternative way to to things.
That's just a simple example I did for a course a couple of days ago and I have shared it :)

offtopic: I'm removing all React.FC and VFC (deprecated) from my components and I'm using again to fn(props: MyType) and for children fn(props: PropsWithChildren).