DEV Community

Cover image for Dark-Mode Toggle Hook in React
coder4life
coder4life

Posted on

Dark-Mode Toggle Hook in React

With this reuseable darkmode hook it gets easy to toggle dark and light mode throughout the application. With the current state saved in localStorage the user will even get his preferred setting on next visit.

Top comments (0)