Last active
June 12, 2017 12:36
-
-
Save rgommezz/7fcdba676ca604c8ea6f57864b30bc13 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
| function* fetchData({ payload }) { | |
| const accessToken = yield select(accessTokenSelector); | |
| try { | |
| const { data } = yield call(api.fetchData, accessToken, payload.params); | |
| yield put(actions.fetchDataSuccess(events)); | |
| } catch (error) { | |
| yield put(actions.fetchDataError(error)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment