Semantically speaking, yes that is a side effect. I feel like if I were calling React.useState(() => 0) instead in order to manage my "ticks" I would use useEffect and pass that ticks variable as a dependency.
React.useState(() => 0)
When calling useReducer like this, you can imagine the Tick action as the dependency with the reducers switch expression as the effect execution.
Before the hooks version of ReasonReact, you would update a ReasonReact reducer by calling ReasonReact.UpdateWithSideEffects - meaning your effects were also performed in the reducer.
See this section for what that used to look like github.com/reasonml/reason-react/b....
Hope that makes sense!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.