Closed ChetSocio closed 1 year ago
use media query keyword 'and'
const isTablet = useMediaQuery({ query: '(min-width: 641px) and (max-width: 1023px)' })
I would recommend using the object syntax for the queries IMO { maxWidth: X, minWidth: Y }
but yeah you can use and
for this.
Hello! I am new to react but I wanted to use both min width and max width .For example: a tablet screen that has min-width of 641px and max-width of 1023px . For mobile and desktop, I have done those successfully but am confused on how to apply both min-width and max-width together?