when I try to persist my data whit redux persist, i get always the initial state after refrashing the page, this is my store, redux perisit version : redux-persist
import { createStore, applyMiddleware } from "redux";
import createSagaMiddleware from "redux-saga";
// import logger from "redux-logger";
import thunk from "redux-thunk";
import rootReducer from "./reducers/rootReducer";
import { rootSaga } from "./sagas/rootSagas";
import { composeWithDevTools } from "redux-devtools-extension";
import { persistStore, persistReducer } from "redux-persist";
import storage from "redux-persist/lib/storage"; // defaults to localStorage for web
import autoMergeLevel2 from "redux-persist/es/stateReconciler/autoMergeLevel2";
import hardSet from "redux-persist/es/stateReconciler/hardSet";
const persistConfig = {
key: "root",
storage,
whitelist: ["publications"],
stateReconciler: autoMergeLevel2,
};
const sagaMiddleware = createSagaMiddleware();
const persistedReducer = persistReducer(persistConfig, rootReducer);
const store = createStore(
persistedReducer,
composeWithDevTools(applyMiddleware(sagaMiddleware))
);
sagaMiddleware.run(rootSaga);
let persistor = persistStore(store);
export { store, persistor };