@trbl/react-mouse-info

1.2.0 • Public • Published

NPM Bundle Size Supported by TRBL

React Mouse Info

Grayish brown.

Quick Start

Installation

$ yarn add @trbl/react-mouse-info

Composition

  import React from 'react';
  import { MouseInfoProvider, withMouseInfo, useMouseInfo } from '@trbl/react-mouse-info';

  const WithMouseInfo = withMouseInfo(({ mouseInfo }) => <div>{mouseInfo}</div>);
  const UseMouseInfo = () => <div>{useMouseInfo()}</div>;

  const App = () => {
    return (
      <MouseInfoProvider>
        <WithMouseInfo />
        <UseMouseInfo />
      </MouseInfoProvider>
    )
  }

  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

Package Sidebar

Install

npm i @trbl/react-mouse-info

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

26.3 kB

Total Files

5

Last publish

Collaborators

  • chrishomsey
  • jacobsfletch
  • trouble