argument of type 'any ' is not assignable to parameter of type 'setstateaction never ' code example
Example: Argument of type 'InitialState' is not assignable to parameter of type 'never'
I also struggled with this problem. The best way to prevent bugs seems to me to add the State Interface as the return type of the reducer. Then you see the type errors inside the reducer instead on the useReducer line.
like this:
function reducer(state: IState, action: IFluxAction): IState {
// reducer code
// type errors are visible here
}