Last active
November 3, 2018 14:30
-
-
Save productioncoder/267e0def2a8a39ed3957ad95393ca744 to your computer and use it in GitHub Desktop.
Youtube watch details watcher saga
This file contains 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
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