Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Youtube in React: channels reducer skeleton
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
You can’t perform that action at this time.