Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Youtube in React: comments reducer for WATCH_DETAILS_SUCCESS
import {COMMENT_THREAD_LIST_RESPONSE} from '../api/youtube-api-response-types';
function reduceWatchDetails(responses, videoId, prevState) {
const commentThreadResponse = responses.find(res => res.result.kind === COMMENT_THREAD_LIST_RESPONSE);
return reduceCommentThread(commentThreadResponse.result, video.id, prevState);
}
/* ... */
export const COMMENT_THREAD_LIST_RESPONSE = 'youtube#commentThreadListResponse';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.