I'm using contextAPI with useState, and the initial value is an Object with Themes.
but when i give console.log this return undefined
and i created a custom hook for this
I used provider in App.
when i do this
const { themeMode } = useToggleTheme()console.log(themeMode) //Undefined
I tried using InitialValues in createContext, but when i use the setThemeMode, that doesnt work. I have other context just using boolean, that returns undefined too. but when i use setXXX that update the state