Closed taivo closed 1 year ago
It looks like useTheme always sets the theme to 'light' instead of the arg passed to it. I've replicated the issue here: https://playcode.io/1076138
Note that even though I called the hook with const { theme, setTheme } = useTheme('synthwave') , the variable theme stays as light
const { theme, setTheme } = useTheme('synthwave')
theme
light
Am I using this wrong somehow? Lmk. Thanks!
I just browsed through the code and it looks like I did use it wrong. is the context provider so it must wrap any component that calls useTheme which in turn calls useContext
useTheme
useContext
It looks like useTheme always sets the theme to 'light' instead of the arg passed to it. I've replicated the issue here: https://playcode.io/1076138
Note that even though I called the hook with
const { theme, setTheme } = useTheme('synthwave')
, the variabletheme
stays aslight
Am I using this wrong somehow? Lmk. Thanks!