Question · JavaScript and React course · Module 3: State and Events
Multiple State Variables
Can you use multiple useState hooks in a single component?
Answer options
- Only when using useReducer
- No, only one useState per component
- Only in class components
- Yes, you can use multiple useState hooks
You can check the correct answer by solving this task in the CodeWorlds game.