Skip to content

Commit

Permalink
json to switch reducer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu-wedensday committed Apr 12, 2024
1 parent 33c8339 commit 262ae8f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/scenes/RootScreen/reducer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createActions } from 'reduxsauce';
import { fromJS } from 'immutable';
import produce from 'immer';
import get from 'lodash/get';
export const {
Types: rootScreenTypes,
Creators: rootScreenActions
Expand All @@ -16,8 +15,8 @@ export const initialState = fromJS({

export const rootContainerReducer = (state = initialState, action) =>
produce(state, () => {
const stateReturn = {
[rootScreenTypes.STARTUP]: state
};
return get(stateReturn, [action.type], state);
switch (action.type) {
default:
return state;
}
});

0 comments on commit 262ae8f

Please sign in to comment.