Skip to content

Instantly share code, notes, and snippets.

@luismec90
Created December 5, 2018 15:53
Show Gist options
  • Save luismec90/fb3090b9f053d957dfb7e432fbf18ae9 to your computer and use it in GitHub Desktop.
Save luismec90/fb3090b9f053d957dfb7e432fbf18ae9 to your computer and use it in GitHub Desktop.
import { SET_YOTPO_REVIEWS } from '../action-constants/yotpo';
export const reducerKey = 'yotpo';
const initialState = {
reviews: [],
};
export default (state = initialState, action) => {
switch (action.type) {
case SET_YOTPO_REVIEWS:
return Object.assign({}, state, { reviews: action.payload });
default:
return state;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment