-
Notifications
You must be signed in to change notification settings - Fork 24
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 Hook only sets value on initial redner #1846
Comments
@mg901 Using your code as a baseline I created a hook locally in my project that seems to be working.
If you want I can open a PR for this if this code looks ok with you |
Hi, @AdlerJS. Thank you for your bug report. Please, install the latest version of the styled-breakpoints to fix it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue:
Per the README the following code should trigger true or false if media query elements are within the 'md' range.
This works as expected for initial render but if the user resizes the hook does not update.
Steps to Reproduce
1.) Place the code in a component and refresh the window. Observe that the console log runs
2.) Resize window to small or large
3.) Observe that the hook / console log doenst update
The text was updated successfully, but these errors were encountered: