Skip to content
React·Intermediate·Conceptual·1 min read

Can dispatch safely be omitted from effect dependencies?

Short interview answer

React guarantees a stable dispatch identity for useReducer, so including or omitting it does not cause an effect to rerun. Other reactive values used by the effect still belong in the list.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to State modeling with reducers

Related questions