Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
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 answers
Answer question

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 Report

0

You can try by moving redux wrapper around the mui wrapper

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!