Skip to content

Instantly share code, notes, and snippets.

@mattraykowski
Created August 10, 2017 20:14
Show Gist options
  • Save mattraykowski/24d14aca612ef40abcd077330402737d to your computer and use it in GitHub Desktop.
Save mattraykowski/24d14aca612ef40abcd077330402737d to your computer and use it in GitHub Desktop.
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