Question · JavaScript and React course · Module 12: React and TypeScript
React.FC vs Explicit Typing
Which approach to typing functional components is currently recommended by the React community?
Answer options
- Explicit typing of props in function parameters
- Using the Component class with a generic
- React.FC - because it automatically adds the children type
- No typing - TypeScript infers types on its own
You can check the correct answer by solving this task in the CodeWorlds game.