silverspy.
silverspy.
TTCTheo's Typesafe Cult
Created by silverspy. on 8/24/2023 in #questions
Redux toolkit Presist Error
I fixed it if anyone wants to know in the future
import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit';
import cartReducer from './state/cartSlice';
import { persistStore, persistReducer } from 'redux-persist';
import storage from 'redux-persist/lib/storage';

const persistConfig = {
key: 'root',
storage,
};
const persistedReducer = persistReducer(persistConfig, cartReducer);

export const store = configureStore({
reducer: {
cart: persistedReducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: false,
}),
});
export const persistor = persistStore(store);
import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit';
import cartReducer from './state/cartSlice';
import { persistStore, persistReducer } from 'redux-persist';
import storage from 'redux-persist/lib/storage';

const persistConfig = {
key: 'root',
storage,
};
const persistedReducer = persistReducer(persistConfig, cartReducer);

export const store = configureStore({
reducer: {
cart: persistedReducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: false,
}),
});
export const persistor = persistStore(store);
2 replies
TTCTheo's Typesafe Cult
Created by Paulius | 24500 Mentor on 8/9/2023 in #questions
How to convert shadcn/ui components to Client component?
in the start of file add a line 'use client'
23 replies