-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set colorMode without flash based on data fetched in asyncData()? #100
Comments
Hi @katerlouis Actually this is not possible for Nuxt 2 since we use We cannot have the |
Do you think this could work when using Nuxt bridge? I'm not sure if Suspense is also supported in Nuxt bridge. |
It might be possible, but still a bit early to say. |
@atinux Any chance I'm lucky and it is possible today? Because we are still very much in Need for this. :( I would offer my help to contribute (if I get a kick start on it, I think I am capable of helping 8)) (We can't run Nuxt-bridge, though... we however do have @nuxtjs/composition-api up and running) EDIT: Just an idea, – does it need to come from |
@atinux I won't give up! :D |
We use storyblok as our CMS where we've added a field to set the desired colorMode for any given "story" (blog post, page, etc.) – All these stories get funneled into one Vue component orchestrating the different story types, so forcing the colorMode with
colorMode: 'black'
in this component is not an option, because the colorMode needs to be fetched first.This is how I imagine it could work, if the colorMode property would support a function as value.
Setting the colorMode directly in
asyncData()
did not work. And doing it inmounted()
results in a flash.Any ideas on how to accomplish this?
The text was updated successfully, but these errors were encountered: