rt2zz/redux-persist

RangeError: Maximum call stack size exceeded

mantegnous opened this issue · 0 comments

I'm trying to combine two reducers and exclude some values from persist, i followed the doc code, it work but..
when i do a dispatch that write in my state i have this error

RangeError: Maximum call stack size exceeded

`import { combineReducers, configureStore } from '@reduxjs/toolkit'
import authReducer from './slices/authSlice'
import { persistReducer, persistStore } from 'redux-persist';

import storage from 'redux-persist/lib/storage';

const rootPersistConfig = {
	key: 'root',
	storage: storage,
	blacklist: ['auth']
}

const authPersistConfig = {
	key: 'auth',
	storage: storage,
	blacklist: ['loading','error','success']
}

const rootReducer = combineReducers({
	auth: persistReducer(authPersistConfig, authReducer),
})

const persistReducers = persistReducer(rootPersistConfig, rootReducer)

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

})

export const persistor = persistStore(store)
`

i dont know where is the error