ScrollSensor

FaCC that re-renders on when scroll position in a DOM element changes.

Props

  • el - HTMLElement whose scrollTop and scrollLeft to track.

Example

import {ScrollSensor} from 'libreact/lib/ScrollSensor';

<ScrollSensor el={element}>{({x, y}) =>
  `x: ${x}, y: ${y}`
}</ScrollSensor>

results matching ""

    No results matching ""