Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

182
Vistas
Handle Dark mode in Material UI redux

I have a React app with Material UI. The dark mode basically works, but anytime I try to change the dark mode state on a page where the page is rendered from redux state data, the whole page crashes. I assume because it loses the redux state:

Warning: Failed prop type: The prop `items` is marked as required in `WarehouseTable`, but its value is `null`.

Which is correct because the Theme wraps the whole App, so all children object re-render itself.

What I don't know is why the redux state is not preserved. Why it seems that the redux state is lost?

How can I handle this?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

The problem for me was that the ReduxProvider and the ThemeProvider was rendered in the same function.

So I moved the ThemeProvider to a ReduxProvider child component and this solved my issue.

about 4 years ago · Juan Pablo Isaza Denunciar

0

You can try by moving redux wrapper around the mui wrapper

 <ReduxProvider>
  <ThemeProvider>
   <App/>
  </ThemeProvider>
 </ReduxProvider>

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda