how to async/await redux-thunk actions?
The Promise approach export default function createUser(params) { const request = axios.post(‘http://www…’, params); return (dispatch) => { function onSuccess(success) { dispatch({ type: CREATE_USER, payload: success }); return success; } function onError(error) { dispatch({ type: ERROR_GENERATED, error }); return error; } request.then(success => onSuccess, error => onError); }; } The async/await approach export default function createUser(params) … Read more