Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Youtube in React: handling COMMENT_THREAD_SUCCESS action
/* ... */
import {COMMENT_THREAD} from '../actions/comment';
/* ... */
export default function (state = initialState, action) {
switch (action.type) {
case COMMENT_THREAD[SUCCESS]:
return reduceCommentThread(action.response, action.videoId, state);
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
You can’t perform that action at this time.