Created
November 16, 2017 01:55
-
-
Save Jahans3/ed22aec54e0955203d0290d254334fe2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const updateUsers = () => async dispatch => { | |
dispatch(fetchUsersBegin()) | |
try { | |
const users = await userService.fetch() | |
dispatch(updateUsersSuccess(users)) | |
catch (err) { | |
dispatch(updateUsersFailure(err)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment