-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Open
Labels
bug 🐛Something doesn't workSomething doesn't workexternal dependencyBlocked by external dependency, we can’t do anything about itBlocked by external dependency, we can’t do anything about ithook: useMediaQuery
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/charming-microservice-imyon7?file=/src/App.tsx
Steps:
- Increase and decrease the window width so you can see the media query updates correctly in the console
- Resize the screen to larger than 600px width and press the button, this will fire the if statement and update the state of isActive
- Now try resizing. the window width above and below 600px
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
Metadata
Metadata
Assignees
Labels
bug 🐛Something doesn't workSomething doesn't workexternal dependencyBlocked by external dependency, we can’t do anything about itBlocked by external dependency, we can’t do anything about ithook: useMediaQuery