Skip to content

How to use with Nuxt Color module #762

Discussion options

You must be logged in to vote

The problem seems to come from an incompatibility between Vue 3 and @vue/composition-api. I opened vuejs/composition-api#844. Basically storeToRefs() doesn't work in Vue 2 yet.

Note: Ideally nuxt color module should expose some useColorPreference() function to be used in the store or in any component because doing useNuxtApp().vue2App.$colorMode is hacky and will break when migrating to Vue 3 (this is unrelated to Pinia). I also saw they are working on a version compatible with Nuxt 3.

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by baixiaoyu2997
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #759 on November 03, 2021 09:53.