Render React components only when they are in viewport.
npm install react-lazyrender
var lazyRenderMixin = require('react-lazyrender/mixin');
var Item = React.createClass({
mixins: [
lazyRenderMixin(
function(nextProps, nextState) {}, // The actual shouldComponentUpdate function
1000 // The buffer distance. Components within this distance away from viewport will also be rendered.
),
],
render: function() {
return <li></li>;
}
});
Removed temporarily