Skip to content

Instantly share code, notes, and snippets.

@productioncoder productioncoder/search.js
Last active Nov 21, 2018

Embed
What would you like to do?
Youtube in React: search reducer skeleton
import {SEARCH_FOR_VIDEOS} from '../actions/search';
import {SUCCESS} from '../actions';
export default function(state = {}, action) {
switch (action.type) {
case SEARCH_FOR_VIDEOS[SUCCESS]:
return reduceSearchForVideos(action.response, action.searchQuery);
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.