the error redux-persist failed to create sync storage. falling back to noop storage. in next.js

49 Views Asked by At

I'm receiving this problem in my Next.js WebApp. I'm trying to establish local storage with persist-redux; if anyone can assist, here's my code: ` import { configureStore } from "@reduxjs/toolkit"; import { persistStore, persistReducer } from "redux-persist";

import userReducer from "./user/userSlicer"; import storage from "redux-persist/lib/storage";

const persistConfig = { key: "root", version: 1, storage, };

const persistedReducer = persistReducer(persistConfig, userReducer);

export const store = configureStore({ reducer: persistedReducer, middleware: (getDefaultMiddleware) => { return getDefaultMiddleware({ serializableCheck: false, }); }, });

export type RootState = ReturnType;

export type AppDispatch = typeof store.dispatch;`

I was expecting having data saved in client browser storage

0

There are 0 best solutions below