Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created November 14, 2018 20:37
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/674e6f19a5d60be8eecc3b397afa9b52 to your computer and use it in GitHub Desktop.
Save productioncoder/674e6f19a5d60be8eecc3b397afa9b52 to your computer and use it in GitHub Desktop.
Youtube in React: updating WATCH_DETAILS worker saga to pass along video id
export function* fetchWatchDetails(videoId, channelId) {
/* ... */
try {
const responses = yield all(requests.map(fn => call(fn)));
yield put(watchActions.details.success(responses, videoId));
} catch (error) {
/* ... */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment