[์—๋Ÿฌ ์ผ์ง€] serializableStateInvariantMiddleware.ts:194 A non-serializable value ...

nemoยท2023๋…„ 1์›” 24์ผ
1

์—๋Ÿฌ ์ผ์ง€

๋ชฉ๋ก ๋ณด๊ธฐ
21/26

๐Ÿšซ serializableStateInvariantMiddleware.ts:194 A non-serializable value was detected in an action, in the path: register. Value: ฦ’ register(key) {
_pStore.dispatch({
type: _constantsWEBPACK_IMPORTED_MODULE_0.REGISTER,
key: key});}
Take a look at the logic that dispatched this action: {type: 'persist/PERSIST', register: ฦ’, rehydrate: ฦ’}
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)

redux-persist ์‚ฌ์šฉ ์ค‘์— ์œ„์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค๋ฉด serializableCheck๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋„๋ก middleware๋ฅผ ์„ค์ •ํ•ด์ฃผ๋ฉด ๋œ๋‹ค.

const store = configureStore({
  reducer: {
    auth: persistReducer(persistAuthConfig, authReducer)
  },
  middleware: (defaultMiddleware) =>
    defaultMiddleware({
      serializableCheck: false
    })
});

0๊ฐœ์˜ ๋Œ“๊ธ€