Guest User

user_reducer.js

a guest
Nov 25th, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import { FETCH_USER_INFO, FETCH_USER_IMG } from '../actions/types';
  2. const INITIAL_STATE = {}
  3. export default (state = INITIAL_STATE, action) => {
  4. switch(action.type) {
  5. case FETCH_USER_INFO:
  6. return action.payload.data;
  7. case FETCH_USER_IMG:
  8. return action.payload.data;
  9. default:
  10. return state;
  11. }
  12. };
Add Comment
Please, Sign In to add comment