Skip to content

Dispatch with Axios doesn't work #51

@tarim

Description

@tarim

Hi There,

I am using your app, and I have an issue for HTTP request with the axios. I don't know why it doesn't work. I used it before with my other applications.
Can you help me, please?

Here is some code
export function getUsers() { return function (dispatch) { dispatch(Action.startLoadingSuccess()); GET(/api/v1/accounts/user`).then(response => {
if(response && response.data) dispatch(Action.getUserSuccess(response));
}).catch(err => { console.log('error is: ', err);
if (err.response && err.response.data) toastr.error('', err.response.data.message, toastrOption);
else {if(err.message) toastr.error('', err.message, toastrOption);}
});
};

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions