Create a React Hook to Toggle Between Light and Dark Mode Inside of Material UI Themes

InstructorThomas Greco

Share this video with your friends

Send Tweet

This video teaches users about the palette.type property Material UI uses when generating theme configuration objects. By default Material UI implements theme using light mode, however, we can change the look of our components by making palette.type equal to dark.

At the end of this lesson, you'll have created a custom hook that provides users the ability to toggle between light and dark mode when using Material UI themes.

Resources

Material UI Docs - Theming Customization

Material UI Docs

Free Community Resource

A Community Resource means that it’s free to access for all. The instructor of this lesson requested it to be open to the public.