Last active
May 21, 2016 15:38
-
-
Save flarnie/e38efb42341b1dde3872 to your computer and use it in GitHub Desktop.
React-Waypoint Infinite Scroll Step 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Waypoint
is undefined.