Created
November 17, 2018 10:37
-
-
Save productioncoder/6472a4ae410119e83bc0b252d59e6a86 to your computer and use it in GitHub Desktop.
Youtube in React: handling COMMENT_THREAD_SUCCESS action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ... */ | |
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