Skip to content

Instantly share code, notes, and snippets.

@flarnie
Last active May 21, 2016 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flarnie/e38efb42341b1dde3872 to your computer and use it in GitHub Desktop.
Save flarnie/e38efb42341b1dde3872 to your computer and use it in GitHub Desktop.
React-Waypoint Infinite Scroll Step 2
var InfiniteScrollExample = React.createClass({
//...
_renderItems: function() {
return this.state.items.map(function(imageUrl, index) {
// ... generate list items here ...
});
},
_renderWaypoint: function() {
if (!this.state.isLoading) {
return (
<Waypoint/>
);
}
},
render: function() {
return (
<div className="infinite-scroll-example">
<div className="infinite-scroll-example__scrollable-parent">
{this._renderItems()}
{this._renderWaypoint()}
</div>
</div>
);
}
});
@rm-rf-etc
Copy link

Waypoint is undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment