Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created December 25, 2016 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeaholicguy/d880be5b18dc2741ed8ddafe125fb4f0 to your computer and use it in GitHub Desktop.
Save codeaholicguy/d880be5b18dc2741ed8ddafe125fb4f0 to your computer and use it in GitHub Desktop.
import {ActionTypes} from '../core/constants';
const initialState = {};
export default function(state = initialState, {type, user}) {
switch (type) {
case ActionTypes.ME_SET:
return {...state, user};
}
return state;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment