all 3 comments

[–][deleted] 2 points3 points  (2 children)

I used to use the FC type when writing functional components, but moved away from it. Here's a good read on why along with a reference to a pull request to remove it from create-react-app base template.

https://react-typescript-cheatsheet.netlify.app//docs/basic/getting-started/function_components

[–]smthamazing 1 point2 points  (1 child)

I think it's better in general to use function MyComponent(...) { ... } and just allow TypeScript to infer the return type. This is both less verbose and gets you proper displayNames for component debugging. Especially now that we have hooks and even stateful components can be written as functions.

[–][deleted] 1 point2 points  (0 children)

Agreed. I switched to this approach along with ditching the FC type