Question · JavaScript and React course · Module 8: Advanced React Patterns
Introduction: Hook Rules
Which of the following is a rule for using hooks?
Answer options
- Hooks can be called inside loops
- Hooks can only be called at the top level of a function
- Hooks can be called conditionally
- Hooks can be called inside nested functions
You can check the correct answer by solving this task in the CodeWorlds game.