Skip to content

Commit

Permalink
feat: disable immutable checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre committed Sep 24, 2024
1 parent 383cc9a commit 01160d0
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/state/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { autoBatchEnhancer, configureStore } from '@reduxjs/toolkit'
import { getConfig } from 'config'
import type { TypedUseSelectorHook } from 'react-redux'
import { useDispatch, useSelector } from 'react-redux'
import { FLUSH, PAUSE, PERSIST, persistStore, PURGE, REGISTER, REHYDRATE } from 'redux-persist'
import { persistStore } from 'redux-persist'
import { getStateWith, registerSelectors } from 'reselect-tools'

import { abiApi } from './apis/abi/abiApi'
Expand Down Expand Up @@ -120,16 +120,10 @@ export const createStore = () =>
},
middleware: getDefaultMiddleware =>
getDefaultMiddleware({
immutableCheck: {
warnAfter: 128,
ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],
},
serializableCheck: {
ignoreState: true,
ignoreActions: true,
warnAfter: 128,
ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],
},
// funnily enough, the checks that should check for perf. issues are actually slowing down the app
// https://github.com/reduxjs/redux-toolkit/issues/415
immutableCheck: false,
serializableCheck: false,
thunk: {
extraArgument: { subscribe: subscriptionMiddleware.subscribe },
},
Expand Down

0 comments on commit 01160d0

Please sign in to comment.