This solution is generated by ChatGPT, correctness is not guaranteed. You might also be able to find a solution fromcommunity posts.
AI solution for React Quiz on BFE.dev
12. useEffect
The code will output the following by console.log:
- 0 (initial value of state)
- 1 (value of state after the first useEffect runs)
- 1 (value of state logged after 100ms in the second useEffect)