Open prateek1656 opened 2 years ago
bro, does infinite scrolling is working fine on your class base component?
Yes bro
Yes bro
Yes bro
can you please share your that code on github? cause mine is not working.
Go to my GitHub profile, there would be a open repo named inews
i need class based component one but that was your functional based component.
handleBackTop = async ()=>{ this.setState({page: 1, articles: []}); this.updateArticle(); }
<InfiniteScroll dataLength={this.state.articles.length} next={this.fetchData} hasMore={this.state.articles.length !== this.state.totalResults} loader={ }
endMessage={
<p style={{ textAlign: "center" }}>
Yay! You have seen it all
}