Skip to content

Instantly share code, notes, and snippets.

@jaysoo
Created October 15, 2019 19:42
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 jaysoo/23f34fae2d49822949199c527a07b279 to your computer and use it in GitHub Desktop.
Save jaysoo/23f34fae2d49822949199c527a07b279 to your computer and use it in GitHub Desktop.
import React from 'react';
import { useViewportSize } from '@use-viewport-size/use-viewport-size';
import './app.css';
export const App = () => {
const size = useViewportSize();
return (
<div className="app">
{size.width}px / {size.height}px
</div>
);
};
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment