Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created November 14, 2018 20:40
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/e99af91cee09f81001daddb0652357da to your computer and use it in GitHub Desktop.
Save productioncoder/e99af91cee09f81001daddb0652357da to your computer and use it in GitHub Desktop.
Youtube in React: WATCH_DETAILS_SUCCESS comment reducer now consumes the video id
export default function (state = initialState, action) {
switch (action.type) {
case WATCH_DETAILS[SUCCESS]:
return reduceWatchDetails(action.response, action.videoId, state);
default:
return state;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment