JSPM

use-window-dimensions

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q44056F
  • License MIT

Função para obter os tamanhos atuais da tela.

Package Exports

  • use-window-dimensions

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (use-window-dimensions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Instalação

Como usar

  • Importe o pacote:
import useWindowDimension from 'useWindowDimensions';

Funcionamento:

...
const Component: React.FC = () => {
  const { height, width } = useWindowDimensions();
  
  return (
    <div>
      <h1>Height: {height} | Width: {width}</h1>
    </div>
  );
}