-
A non-serializable value was detected in an action, in the path: `register`. Value: ƒ register2(key) ... 에러Front-End/React.js 2024. 10. 30. 16:03
redux-persist 라이브러리를 사용하던 중 발생한 에러.
오류가 나는 건 아닌데 괜히 거슬린다.. 😡
똑같은 에러를 마주한 사람 발견
https://github.com/rt2zz/redux-persist/issues/1455
getting error: A non-serializable value was detected in an action · Issue #1455 · rt2zz/redux-persist
hello, im using react with redux tkq and persist, im facing some error which im not sure what occurred it, what im trying to do, is to persist authSlice in order to keep user's data while refreshin...
github.com
댓글 중 따봉이 많이 눌러진 글 번역..
오옷 '여기에' 를 누르면 해당 경로로 이동한다.
https://redux-toolkit.js.org/usage/usage-guide#use-with-redux-persist
redux store 생성 함수로 이동하여 middleware 코드 추가하기!
import { persistStore, persistReducer, FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER, } from 'redux-persist' const store = configureStore({ reducer: persistedReducer, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: { ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER], }, }), })