Skip to content

Commit

Permalink
remove init action handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jin60641 committed Jan 7, 2024
1 parent 9df0df7 commit a59ed47
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/create-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ export function createReducer<TState, TRootAction extends Action = RootAction>(
...initialHandlers,
};

const initializationActionTypes = /@@redux\/INIT.*/;

const rootReducer: Reducer<TState, TRootAction> = (
state = initialState,
action: TRootAction
Expand All @@ -129,7 +127,7 @@ export function createReducer<TState, TRootAction extends Action = RootAction>(
);
}
return reducer(state, action);
} else if (defaultReducer && !initializationActionTypes.test(action.type)) {
} else if (defaultReducer) {
return defaultReducer(state, action);
} else {
return state;
Expand Down

0 comments on commit a59ed47

Please sign in to comment.