UNPKG

fb-test-module

Version:

How to use: ``` import {store, getStore} from 'fb-test-module'; conf.DialogramApi = "API_BASE_URL"; conf.Platform = "mobile"; //use "web" if you are on webApp getStore(); //Inject store in your provider ``` and you'r readyt to go. # Base ## Act

19 lines (17 loc) 551 B
import { fromJS } from 'immutable'; import { ActionType } from '../BaseModel'; import { Status } from '../BaseType'; import { USER_ENTITY, REMOVE_USER } from './Type'; import { baseReducer } from '../BaseReducer'; const initialState = fromJS({ status: Status.Default, error: undefined }); export const userReducer = (state = initialState, action) => { switch (action.type) { case REMOVE_USER: return initialState; default: return baseReducer(state, action, USER_ENTITY); }; }