0.0.3 • Published 6 years ago

@trbl/react-scroll-position v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

NPM Bundle Size Supported by TRBL

React Scroll Position

A roll, as of parchment or papyrus, used especially in the writing of a document.

Quick Start

Installation

$ yarn add @trbl/react-scroll-position

Compositon

  import React from 'react';
  import { ScrollPositionProvider, withScrollPosition } from '@trbl/react-scroll-position';

  const MyComponent = withScrollPosition(() => return <div>My Component</div>);

  const App = () => {
    return (
      <ScrollPositionProvider>
        <MyComponent>
          ...
        </MyComponent>
      </ScrollPositionProvider>
    )
  }

  export default App;

Demo

To demo locally, clone the repo and

$ yarn install
$ npm run dev
$ open http://localhost:3000

Documentation

All available props can be found via the references below:

License

MIT Copyright (c) TRBL, LLC

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago