1.0.0 • Published 3 years ago

observe-visibility v1.0.0

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

Observe Visibility

Summary

Observe React component visibility in the viewport or visibility relative to an ancestor.

Installation

$ npm install observe-visibility
$ yarn add observe-visibility

Usage

Example:

<ObserveVisibility>
  {({ isVisible }) => {
    isVisible && doSomething();
    return <Placeholder />;
  }}
</ObserveVisibility>

Contributing

If you are interested in contributing, please submit a pull request.

License

MIT