Install
npm
Description
TheuseDarkMode hook provides a simple way to toggle between dark and light themes in your application. It manages the theme state and automatically applies the appropriate class to the body element, ensuring that the entire page reflects the selected theme. This is particularly useful for adding dark mode support to your application with minimal setup.
Parameters
This hook does not require any parameters.Return Values
Example
useDarkMode.example.tsx