React·Advanced·Conceptual·1 min read
Why can an effect loop forever?
Short interview answer
It sets state, that update changes one of its dependencies—often a freshly created object—and the effect runs again. Fix the ownership or unstable dependency.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.