The useEffect Dependency Array: Every Rule and Why It Exists
The dependency array is not a performance optimization — it is a correctness contract. Every value the effect reads from the component scope must be in it. Here is what breaks when that contract is violated and how the linter enforces it.
June 7, 20261 min read2 / 3