This is a demo of James Long's Optimized List as featured in http://jlongster.com/Removing-User-Interface-Complexity,-or-Why-React-is-Awesome
Well, I wanted his code pulled out into a working React component for learning purposes and for use. I took the Gist as it was and found it did not work as is, so I had to make modifications to get it to work.
- Carry over CSS used in the iframe
- Use
|| window.pageYOffsetinstead of juste.pageYin window.scroll
- Changed
componentDidRender()tocomponentDidMount()per React 0.12 - Removed call to
requestAnimationFrame()and recursive call torender() - Moved
window.addEventListener('scroll'...into tocomponentDidMount() - Use
setState()
npm install
gulp