They must not be imperative. As a quick reference erlang with OTP.
One can emit new state without modifying old state.
Immutable data structures != declarative.
Because you're not creating and updating nodes like in jQuery. You lay out a view, declaratively, fill out the holes where you want state, ie counter values, and then you have controllers to fill that out. When state changes, you recompute the entire view rather than imperatively changing out DOM nodes.
By the way "declarative" doesn't really mean anything with very specific boundaries.
Would've been that better if you had some `increment(state)` that updated a ref anyway?
No, it's has the same semantic.
Method can return the whole new state, the changed fields or actions to be taken.
Or method can call the passed continuation with changed values instead of return.