-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Create all classes needed for light mode
Apply the correct class when dark mode state changes
If you need to access dark mode state in a component, add the following:
Import the hook from React Redux - at top of component file with other imports
import { useSelector } from "react-redux";
In the component function, access the darkMode state from the redux store and apply it to the variable darkMode. You can then reference this variable whenever you need to access the state - it will be true (dark mode) or false (light mode)
const darkMode = useSelector(state => state.darkMode.value);