Skip to content

Commit 4199e56

Browse files
committed
Update store.js
1 parent b3c6f93 commit 4199e56

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/redux/store.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@ import { combineReducers, configureStore } from '@reduxjs/toolkit';
22
import { contactsReducer } from './slices/contactsSlice';
33
import { filterReducer } from './slices/filterSlice';
44

5-
import { persistReducer, persistStore } from 'redux-persist';
5+
import {
6+
FLUSH,
7+
PAUSE,
8+
PERSIST,
9+
PURGE,
10+
REGISTER,
11+
REHYDRATE,
12+
persistReducer,
13+
persistStore,
14+
} from 'redux-persist';
615
import storage from 'redux-persist/lib/storage';
716

817
/**
@@ -32,7 +41,9 @@ export const store = configureStore({
3241
reducer: persistedReducer,
3342
middleware: getDefaultMiddleware =>
3443
getDefaultMiddleware({
35-
serializableCheck: false,
44+
serializableCheck: {
45+
ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],
46+
},
3647
}),
3748
});
3849

0 commit comments

Comments
 (0)