react-impr
v1.0.0
Published
high performance react impr lib
Downloads
2
Readme
React-Impr
React-impr is a high-performance React exposure library that uses only one IntersectionObserver to observe elements.
Install
npm i react-impr
Usage
Impr
Component will not affect your dom structure, just wrapper it to your components that want to be exposed.
import Impr from 'react-impr';
const Demo = () => {
const onImpr = () => {
// your log function
Log.trace('demo-id',{});
}
return (
<div>
<Impr onImpr={onImpr}>
<section>section1</section>
</Impr>
</div>
);
};
export default Demo;