Created
November 11, 2018 21:11
-
-
Save productioncoder/ab1137435f5ed2ab1cf169f179d6d796 to your computer and use it in GitHub Desktop.
Youtube in React: channel reducer reacts to VIDEO_DETAILS_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
export default function (state = initialState, action) { | |
switch (action.type) { | |
case WATCH_DETAILS[SUCCESS]: | |
return reduceWatchDetails(action.response, state); | |
case VIDEO_DETAILS[SUCCESS]: | |
return reduceVideoDetails(action.response, state); | |
default: | |
return state; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment