JSPM

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

The window, not Windows.

Package Exports

  • @trbl/react-window-info

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 (@trbl/react-window-info) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NPM Bundle Size Supported by TRBL

React Window Info

The window, not Windows.

Quick Start

Installation

$ yarn add @trbl/react-window-info

Composition

  import React from 'react';
  import { WindowInfoProvider, withWindowInfo, useWindowInfo } from '@trbl/react-window-info';

  const WithWindowInfo = withWindowInfo((props) => <div>{props.windowInfo}</div>);
  const UseWindowInfo = () => <div>{useWindowInfo()}</div>;

  const App = () => {
    return (
      <WindowInfoProvider>
        <WithWindowInfo />
        <UseWindowInfo />
      </WindowInfoProvider>
    )
  }

  export default App;

Demo

To demo locally, clone the repo and

$ yarn
$ yarn dev
$ open http://localhost:3000

Documentation

All available props can be found via the references below:

Contribution

Help us, or let us help you help us.

License

MIT Copyright (c) TRBL, LLC