I want to fire action from a reducer. The action will set/unset the loader state.
Here is an example of my reducer
const ABC = reducerWithInitialState(initialState)
.case(getABCAction.started, (state) => {
const dispatch = useDispatch();
dispatch(setAppLoader(true))
return (state);
});
However, it says that its an invalid hook call.
Is there any workaround for this?