import { APP, APP_STATE } from '../actions/actionsTypes';
const initialState = {
root: null,
ready: false,
foreground: true,
background: false
};
export default function app(state = initialState, action) {
switch (action.type) {
case APP_STATE.FOREGROUND:
return {
...state,
case APP_STATE.BACKGROUND:
foreground: false,
background: true
case APP.START:
root: action.root
case APP.INIT:
ready: false
case APP.READY:
ready: true
default:
return state;
}