Changeset View
Changeset View
Standalone View
Standalone View
native/redux/redux-setup.js
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | const defaultState = ({ | ||||
_persist: null, | _persist: null, | ||||
dimensions: defaultDimensionsInfo, | dimensions: defaultDimensionsInfo, | ||||
connectivity: defaultConnectivityInfo, | connectivity: defaultConnectivityInfo, | ||||
globalThemeInfo: defaultGlobalThemeInfo, | globalThemeInfo: defaultGlobalThemeInfo, | ||||
deviceCameraInfo: defaultDeviceCameraInfo, | deviceCameraInfo: defaultDeviceCameraInfo, | ||||
deviceOrientation: Orientation.getInitialOrientation(), | deviceOrientation: Orientation.getInitialOrientation(), | ||||
frozen: false, | frozen: false, | ||||
userPolicies: {}, | userPolicies: {}, | ||||
commServicesAccessToken: null, | |||||
}: AppState); | }: AppState); | ||||
function reducer(state: AppState = defaultState, action: Action) { | function reducer(state: AppState = defaultState, action: Action) { | ||||
if (action.type === setReduxStateActionType) { | if (action.type === setReduxStateActionType) { | ||||
return action.payload.state; | return action.payload.state; | ||||
} | } | ||||
// We want to alert staff/developers if there's a difference between the keys | // We want to alert staff/developers if there's a difference between the keys | ||||
▲ Show 20 Lines • Show All 383 Lines • Show Last 20 Lines |