Adds css classes depending on element visibility within its parent.
import { render } from 'react-dom';
import InView from '@tolkam/react-in-view';
const scrollingParent = <div className="myScrollingParent">
<InView>
<div>Track me and update my classes!</div>
</InView>
</div>
render(scrollingParent, document.getElementById('app'));
The code is rather self-explanatory and API is intended to be as simple as possible. Please, read the sources/Docblock if you have any questions. See Usage and IProps for quick start.
Proprietary / Unlicensed 🤷