Это я понял, но как связано с этим то, что она вернёт?
"If you're curious, this is because the updates are not processed until the render phase. For example if you write setCount(c => c) (a no-op state update), that state updater function is called during the render (we do this for consistency with useReducer, which does this in order to have access to the latest props). So there's no way to skip it. Similarly, if you were to call setCount(c => c + 1); setCount(count); with two updates that "cancel out", that isn't known until the render function is called."