This content originally appeared on DEV Community and was authored by coder4life
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.
This content originally appeared on DEV Community and was authored by coder4life
coder4life | Sciencx (2021-10-14T11:26:17+00:00) Dark-Mode Toggle Hook in React. Retrieved from https://www.scien.cx/2021/10/14/dark-mode-toggle-hook-in-react/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.