Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

261
Visualizações
Is there a way to disable Redux warning: A non-serializable value was detected in the state

Firefox console log

I'm completely aware of the downsides of storing non-serializable values to Redux state. Like the Redux docs say:

If you are okay with things like persistence and time-travel debugging potentially not working as intended, then you are totally welcome to put non-serializable items into your Redux store.

So, I'm just prototyping to try out some ideas. I might refactor the code in the future to eliminate these function objects from state, but at the moment these warnings are just flooding my console, burying other messages I might actually care about.

Is there perhaps some switch to toggle these warnings on/off?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

It's a redux-toolkit error and the whole error links to documentation that shows how you can disable the errors for specific actions.

https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data

To quote:

However, if you do need to turnoff those warnings, you can customize the middleware by configuring it to ignore specific action types, or fields in actions and state:

configureStore({
  //...
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      serializableCheck: {
        // Ignore these action types
        ignoredActions: ['your/action/type'],
        // Ignore these field paths in all actions
        ignoredActionPaths: ['meta.arg', 'payload.timestamp'],
        // Ignore these paths in the state
        ignoredPaths: ['items.dates'],
      },
    }),
})
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda