
React Scroll Info
Highlights
Quick Start
Installation
$ npm i @faceless-ui/scroll-info
$
$ yarn add @faceless-ui/scroll-info
Composition
import React from 'react';
import { ScrollInfoProvider, withScrollInfo, useScrollInfo } from '@faceless-ui/scroll-info';
const WithScrollInfo = withScrollInfo(({ scrollInfo }) => <div>{scrollInfo}</div>);
const UseScrollInfo = () => <div>{useScrollInfo()}</div>;
const App = () => (
<ScrollInfoProvider>
<WithScrollInfo />
<UseScrollInfo />
</ScrollInfoProvider>
)
export default App;
For working examples, see the demo app.
Demo
$ git clone git@github.com:faceless-ui/scroll-info.git
$ yarn
$ yarn dev
$ open http://localhost:3000
API
Contribution
Help us, or let us help you help us.
License
MIT Copyright (c) TRBL, LLC