0.0.3 • Published 4 years ago

@andreyradkevichasap/use-screen-width v0.0.3

Weekly downloads
13
License
-
Repository
-
Last release
4 years ago

The reason why I've created this hook , was problem which I've met when I used other existing hooks , and there was problem in getting width and height on different devices and it wasn't working on rotation changing event, etc . This hooks works properly for each device. It is tested on my own project . Hope it will help to someone .

import useScreenWidth from "@andreyradkevichasap/use-screen-width";

const YourComponent = () => {
  const { width, height } = useScriptLoader();

  //.... using height and width inside your component
};