React Scroll View
A more sane way to work with scrolling inside React. The basis idea is to wrap elements which should be able to scroll inside a createScrollContainer
function and then wrap elements which should interact with the scroll container inside a withScrollApi
function, which will then add the scroll API to it's props.
If for instance we have a parent.js
;; <div> children </div>;
it's children would then be able to interact with it using this.props.scroll
;; { thisstate = atEnd: false; items: 500; } { const scroll = thisprops; scroll; } { return <div> thisstateitems </div> };