this works well in_app, but when I try to use this as hook in a component, I can't use the following functions:
const {
switchToAutoMode, // function - toggles the auto mode on
switchToDarkMode, // function - toggles the dark mode on
switchToLightMode, // function - toggles the light mode on
} = useDarkMode()
console.log(useDarkMode())
Hi @tchret
I saw that removing the provider stopped the functions from working.
I have removed it in the new update, please try the example now, you can use the hooks normally.
Thanks
disclaimer: I'm new to next.
this works well in
_app
, but when I try to use this as hook in a component, I can't use the following functions: