michaelcontento / redux-storage

Persistence layer for redux with flexible backends
MIT License
675 stars 50 forks source link

Uncaught (in promise) TypeError: dispatch is not a function #178

Closed yashsugandh closed 6 years ago

yashsugandh commented 6 years ago

Hello guys, i just started using redux all was working properly while performing get and post request but while performing delete operation i am getting this erro

`export const fetchUsers = () => async dispatch => {
    const res = await axios.get('/api/allUsers');
    dispatch({ type: FETCH_ALL_USERS, payload: res.data });
};
export const deleteAUser = (id) => async dispatch => {
    const res = await axios.delete('/api/DeleteAUser/'+id);
    console.log(res);
    dispatch({ type: DELETE_A_USER, payload: res.data });
`};` `