Last active
November 27, 2018 17:24
-
-
Save ger86/ac083b24c0ee04f058fb9aff21a803b7 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
export function getPostsThunk(params) { | |
return async (dispatch, getState) => { | |
try { | |
const res = await getPosts(params); | |
dispatch(getPostsSucceededAction(res.data)); | |
} catch (error) { | |
throw createApiError(error); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment