React·Intermediate·Conceptual·1 min read
How should the dependency list be chosen?
Short interview answer
It must include every reactive value read by the effect. The list describes the code's dependencies; it is not a manual scheduling preference. If that causes excessive reruns, restructure ownership, stabilize a value where semantically appropriate, or remove an unnecessary effect.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.