Demo app has custom Hook which determines whether an element is in the viewport or not, returing true if it is, otherwise false. Hook is called useIsElementInView
.
Demo uses IntersectionObserver. See https://caniuse.com/#feat=intersectionobserver
- Install dependencies (
yarn
ornpm install
) - Start demo locally (
yarn start
ornpm start
) - You're welcome :)