-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[useMediaQuery] Doesn't fire after state change #36165
Comments
I don't see a bug, it seems to behave correctly. How is it not correct? Do you have a recording? |
Hopefully this video helps: Screen.Recording.2023-02-14.at.14.41.14.movDo you see how the component doesn't rerender after the button is pressed? |
I'm not able to reproduce it. @pavsidhu, could you please share details about your environment? |
Sure, the browser used in that example was Microsoft Edge Version 110 running on a M1 Macbook Pro Ventura 13.0.1 |
I couldn't reproduce it on Edge (I've got v111), but it happened once in Safari. I couldn't repeat it, though. It seems there is a subtle bug somewhere. |
For these steps, I couldn't reproduce the issue. But I can reproduce the issue following the steps of the given video. Steps:
It should be the problem with PS: I only change react version to |
Thanks for investigating it. Let's wait for 18.3, then. I'm labelling it as "external dependency". |
+1 |
This hasn't been addressed in 18.3.1 but is fixed in the 18.3.0 canary. Does anyone know if there's another React 18 version coming? |
Duplicates
Latest version
Steps to reproduce 馃暪
Link to live example: https://codesandbox.io/s/charming-microservice-imyon7?file=/src/App.tsx
Steps:
Current behavior 馃槸
The component only rerenders when resizing the window when the media query does not match
Expected behavior 馃
I expect the component to also rerender when the media query matches
Context 馃敠
No response
Your environment 馃寧
No response
The text was updated successfully, but these errors were encountered: