Closed jakhsu closed 1 year ago
Reading the doc more I realised that (https://color-mode.nuxtjs.org/#configuration) the module is probably detecting my system preference, which I haven't touched so would result in light
being injected into colorMode.value
. I used the chrome devtool to emulate a dark mode preference and indeed colorMode.value
is being set as dark
now.
So I suppose $colorMode.value
shouldn't be directly set or used in template as it might cause template mismatch? Not sure if the doc example needs to be changed.
Hi,
I couldn't reproduce the problem so thought I should file a question instead.
I'm following the minimal example provide in doc:
But I get hydration mismatch error:
I tried to log the
colorMode.value
andcolorMode.preference
and when preference is set tosystem
, value is alsosystem
but only for a split second and then will turn intolight
.This doesn't happen with other colors, only for
system
andlight
. Have no idea what's alteringcolorMode.value