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

Suraj Sharma @creativesuraj

Joined:
Dec 1, 2019

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

Publish Date: Aug 15 '20
32 1

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!

Comments 1 total

    Add comment