How to use the @reach/window-size.useWindowSize function in @reach/window-size

To help you get started, we’ve selected a few @reach/window-size examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github reach / reach-ui / packages / window-size / examples / hook.example.js View on Github external
export function Example() {
  const sizes = useWindowSize();
  return (
    <pre>Window size (but with a hook): {JSON.stringify(sizes, null, 2)}</pre>
  );
}

@reach/window-size

Measure the window size in React

MIT
Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis

Popular @reach/window-size functions

Similar packages