Giter Club home page Giter Club logo

Comments (3)

heyitsarpit avatar heyitsarpit commented on May 24, 2024

Hey @Gilbishkosma, I tried to reproduce this with Firefox devtools but couldn't reproduce it. I was able to reproduce it in chrome devtools, only it wasn't the 15px that you mentioned. I then decided to try it on a chrome window(devtools closed)
with useMediaQuery('(min-width: 1200px)'). And didn't notice any issue. My current guess is that when devtools is open, some internal event listeners are skipped.

Here's the component I used to check.

import { useMediaQuery, useWindowSize } from '@react-hooks-library/core'

export default function Test() {
  const minWidth = useMediaQuery('(min-width: 1200px)')
  const { width } = useWindowSize()

  return (
    <div>
      minWidth -{' '}
      <span className={`pill ${minWidth ? 'success' : 'danger'}`}>
        {minWidth.toString()}
      </span>
      <div>width - {width}px</div>
    </div>
  )
}

from react-hooks-library.

heyitsarpit avatar heyitsarpit commented on May 24, 2024

Also found this issue. - Chrome Device Mode Emulation Media Queries Not Working

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" /> might be your fix.

from react-hooks-library.

Gilbishkosma avatar Gilbishkosma commented on May 24, 2024

Also found this issue. - Chrome Device Mode Emulation Media Queries Not Working

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" /> might be your fix.

thanks for checking, i will try it, you can close the issue then.

from react-hooks-library.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.