Skip to content

Instantly share code, notes, and snippets.

@Siemko
Created November 7, 2019 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Siemko/e3db2a24243d80b63f60bd77d3163499 to your computer and use it in GitHub Desktop.
Save Siemko/e3db2a24243d80b63f60bd77d3163499 to your computer and use it in GitHub Desktop.
import React from "react";
import useWindowSize from "./useWindowSize";
const WindowSize = () => {
const { width, height } = useWindowSize();
return (
<>
<h2>Window size: {width} x {height}</h2>
</>
);
};
export default WindowSize;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment