Created
August 10, 2017 20:14
-
-
Save mattraykowski/24d14aca612ef40abcd077330402737d 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* fetchAllTheThingsTask() { | |
const {forms, categories } = yield all({ | |
forms: call(fetchForms), | |
categories: call(fetchCategories), | |
}); | |
const other = convertThings(forms, categories); | |
yield all([ | |
put(actions.setForms(forms)); | |
put(actions.setCategories(categories)); | |
]); | |
}; | |
export function* watchThings() { | |
yield takeEvery(types.FETCH_ALL_THE_THINGS, fetchAllTheThingsTask); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment