Argument of type 'void' is not assignable to parameter of type 'SetStateAction<never[]>'. code example
Example 1: 'this' context of type 'void' is not assignable to method's 'this' of type 'Observable<{}>'.
import { map } from "rxjs/operators";
Example 2: 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
}