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
useMediaQuery
is not working as expected
#1591
Comments
Yes, I am also feeling the same issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Keep it open |
It should be solved in #2178 . How about trying again with the newest version of VueUse? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It is working as expected after trying posted code with the latest version. |
Describe the bug
I am using
usePreferredColorScheme
composable but I wasn't returning the value I wanted so I dig down and tried to useuseMediaQuery
.I noticed that
useMediaQuery('(prefers-color-scheme: dark)')
is returningfalse
. However, if I run below code, I getDARK MODE...
logged to console.Full code
Output
Reproduction
https://stackblitz.com/edit/vitejs-vite-dlmmn4?file=src/App.vue
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: