yocontra/react-responsive

Resizing doesn't work on breakpoints value

ajay-verma8245 opened this issue · 2 comments

Resizing doesn't work on breakpoints value:
On exact device width of 640px(or 1024 px), Media query stopped working.

Sample example:
https://codesandbox.io/p/sandbox/responsive-r5tgq9?

Screen Recording:

2024-01-17.20-59-10.mp4

This is a usage issue - remember that under the hood we are using CSS media queries, so you would have the same issue if you wrote this in plain CSS. See https://stackoverflow.com/questions/13241531/what-are-the-rules-for-css-media-query-overlap for some more info on how to structure these so they are mutually exclusive.

Screenshot 2024-03-19 at 12 43 40 PM

This might also apply if you are using retina screens you may need to add .5 ^