Created
November 11, 2018 13:56
-
-
Save productioncoder/5442937c3df6bcde2765604118b7de51 to your computer and use it in GitHub Desktop.
Youtube in React: channels reducer skeleton
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 {VIDEO_DETAILS, WATCH_DETAILS} from '../actions/watch'; | |
import {SUCCESS} from '../actions'; | |
import {CHANNEL_LIST_RESPONSE} from '../api/youtube-api-response-types'; | |
const initialState = { | |
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