QuizNot attempted
Two instances of a custom hook
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
2and101— each call to a custom hook gets its own independent state instance
- Each custom hook call runs its own
useState, so every call gets an independent state slot: A goes 0→2, B goes 100→101. - Not 2 and 102: hooks share logic, never state (use context or a store to share state).
- Not 0 and 100: the setters do update.
- Not 'throws': calling the same hook twice is normal.