Last active
July 2, 2019 15:54
-
-
Save apisandipas/f5d094193bd212678606e4b94010de55 to your computer and use it in GitHub Desktop.
This file contains 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 fetchArticles = () => async (dispatch, getState, { api }) => { | |
//… request action fired.. | |
try { | |
await api.get(‘/relative-path’) // already pointed to API server | |
// dispatch success | |
} catch(e) { | |
//dispatch error | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment