Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Last active February 28, 2019 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save productioncoder/cc256e6745a95af9ac297825930eff5d to your computer and use it in GitHub Desktop.
Save productioncoder/cc256e6745a95af9ac297825930eff5d to your computer and use it in GitHub Desktop.
Youtube video watcher saga
import * as api from '../api/youtube-api';
import {fork, take, takeEvery, call, all, put} from 'redux-saga/effects';
import {fetchEntity} from './index';
export const fetchVideoCategories = fetchEntity.bind(null, api.buildVideoCategoriesRequest, videoActions.categories);
export function* watchVideoCategories() {
yield takeEvery(videoActions.VIDEO_CATEGORIES[REQUEST], fetchVideoCategories);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment