react-inview-hook
react-hooks with intersection-observer.
Why?
This module will cache IntersectionObservers (group by IntersectionObserverInit).
That's reason is performance on IE11 with polyfill.
Note
This module uses Map
and IntersectionObserver
If you use this in es5 environment, should install polyfills below.
Map
@babel/polyfill
ores6-map
etc.
IntersectionObserver
intersection-observer
Usage
;; ;
API
useInView(props: UseInViewProps)
;