DEV Community

Discussion on: React + TypeScript ❤️: The good parts ⚡

Collapse
 
erikhofer profile image
Erik Hofer

Nice post! I like using the the React.FC type for functional components. Your List component would look like this:

const List: React.FC<Props> = ({ labels }) => {
  // ...
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
antoinerousseau profile image
Antoine Rousseau • Edited

React.FC adds a children prop which we don't want in this example.