Earlier quoted context omitted.
It all seems right, except the reducer function does not mutate the fiber object. Your function is certainly not pure, it boldly mutates the outside state via increment operator. It is incorrect to extrapolate this on how fiber works. The difference is that React hook, with both state and setter lives inside the dispatcher, and calling the hook setter only enqueues an update which is then handled by dispatcher, so te…
Enqueuing an update is mutating an update queue. None of these semantic games affect the fact that the value of `count` does not depend only on the parameters to the function.
1: https://github.com/macabeus/js-proposal-algebraic-effects