Opt-in: skip full refresh unless one of the listed states has changed since last refresh.
This hook MUST be called at the top level of a component function — never inside loops, conditions, nested functions, or callbacks.
The call order of all hooks is strictly fixed across every refresh; reordering calls will corrupt internal state.
Call once, after all relevant useState hooks.
If none of the watched states changed → skips re-running component body, hooks, children.
Opt-in: skip full refresh unless one of the listed states has changed since last refresh.
This hook MUST be called at the top level of a component function — never inside loops, conditions, nested functions, or callbacks. The call order of all hooks is strictly fixed across every refresh; reordering calls will corrupt internal state.
Call once, after all relevant
useStatehooks. If none of the watched states changed → skips re-running component body, hooks, children.