Skip to content

Latest commit

 

History

History
14 lines (8 loc) · 450 Bytes

File metadata and controls

14 lines (8 loc) · 450 Bytes

Playing with React Hooks

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.

Pre-requisities

Demo uses IntersectionObserver. See https://caniuse.com/#feat=intersectionobserver

Getting up and running

  1. Install dependencies (yarn or npm install)
  2. Start demo locally (yarn start or npm start)
  3. You're welcome :)