How to build a dark mode theme using React Material UI, React context API and React hooks

creativesuraj

Suraj Sharma

Posted on August 15, 2020

How to build a dark mode theme using React Material UI, React context API and React hooks

This article is about creating your own 'ThemeProvider' component to toggle between the light mode and dark mode built using React Context API and React hooks useMemo() and useCallback() even created a new custom hook useChangeTheme()

I recently added a button to toggle between light mode and dark mode on my personal blog, for that I created a separate library called 'react-material-ui-dark-mode'

If you're interested in reading more about how to build own your toggle button or want to use my library in your projects.

Follow my blog post on my personal website or you can fork the GitHub repository react-material-ui-dark-mode

Please leave your feedback on the comment box below.

Thank You!

💖 💪 🙅 🚩
creativesuraj
Suraj Sharma

Posted on August 15, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related