Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Last active November 8, 2018 21:18
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/88b694c39bfc941e8e2f807017de65b3 to your computer and use it in GitHub Desktop.
Save productioncoder/88b694c39bfc941e8e2f807017de65b3 to your computer and use it in GitHub Desktop.
Youtube reduceWatchDetails with VIDEO_LIST_RESPONSE type
import {VIDEO_LIST_RESPONSE} from '../api/youtube-api-response-types';
/*...*/
function reduceWatchDetails(responses, prevState) {
const videoDetailResponse = responses.find(r => r.result.kind === VIDEO_LIST_RESPONSE);
/* ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment