DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Frontend Performance Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
medium
Frontend Performance
Demonstrated live in the stale-closure preset, what happens with an effect that has an empty dependency array but reads a state variable inside a setInterval callback?
A
The callback always sees the current value automatically
B
The callback permanently closes over the value from the render when the effect first ran — it never sees subsequent updates
C
The effect re-runs automatically whenever the state changes, despite the empty array
D
This pattern is impossible to write in React
Check Answer