Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Last active November 3, 2018 14:30
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/267e0def2a8a39ed3957ad95393ca744 to your computer and use it in GitHub Desktop.
Save productioncoder/267e0def2a8a39ed3957ad95393ca744 to your computer and use it in GitHub Desktop.
Youtube watch details watcher saga
import {fork, take} from 'redux-saga/effects';
import * as watchActions from '../actions/watch';
import {REQUEST} from '../actions';
export function* watchWatchDetails() {
while (true) {
const {videoId} = yield take(watchActions.WATCH_DETAILS[REQUEST]);
yield fork(fetchWatchDetails, videoId);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment