Idk how to hydrate / execute client side only
When I have this code:
I get this console.warn message:
And background image is dark, even though system theme, and subsequently the page, is light.
4 Replies
what is useColorMode
looks like when its rendered on the server thats dark mode but on the client its light mode
meaning the computed returns two different images
i found a related issue saying that you should try it in the onMounted function
https://github.com/vueuse/vueuse/issues/1378
atm i cant test since im on my phone
https://github.com/vueuse/vueuse/issues/2035 additional issue with more details
I solved this by using a different approach, but thank you for your response
how can i create global ref, when using onMounted?
i'd expect you'd but some arbitrary default value top level
and have it overwrite that but it's not ideal
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View