Skip to content

Commit

Permalink
front: disable immutableCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
kmer2016 committed Jan 2, 2024
1 parent d35774e commit 3b02142
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions front/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ const store = configureStore({
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: false,
// The following line disables the detection of immutability across the entire Redux state.
// Immutability detection can be time-consuming, especially for large stores
// and can show warning message : "ImmutableStateInvariantMiddleware took xms, which is more than the warning threshold of 32ms."
// Since we use RTK, which incorporates Immer for managing our store slices,
// this check is not really necessary since Immer has already ensured the store immutability.
// Disabling this feature improve performance. https://github.com/reduxjs/redux-toolkit/issues/415
immutableCheck: false,
thunk: {
extraArgument: ChartSynchronizer.getInstance(),
},
Expand Down

0 comments on commit 3b02142

Please sign in to comment.