Last active
November 14, 2018 20:45
-
-
Save productioncoder/6fb7ec82d86977b6dbd09cafdde8e737 to your computer and use it in GitHub Desktop.
Youtube in react: comments reducer
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 {SUCCESS} from '../actions'; | |
import {WATCH_DETAILS} from '../actions/watch'; | |
const initialState = { | |
byVideo: {}, | |
byId: {}, | |
}; | |
export default function (state = initialState, action) { | |
switch (action.type) { | |
case WATCH_DETAILS[SUCCESS]: | |
return reduceWatchDetails(action.response, state); | |
default: | |
return state; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment