---
title: "Discussion on \"How to Implement Infinite Scrolling with React.js\" | Hashnode"
description: "Discussion on \"How to Implement Infinite Scrolling with React.js\". Introduction\nAny application that has a huge amount of data to show on a  screen negatively affects the overall performance of an application. To overcome this performance degradation there are some widely used techniques. In this post, we will learn..."
url: "https://hashnode.com/posts/how-to-implement-infinite-scrolling-with-reactjs/627ab5c9f543e7a92b804006"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Implement Infinite Scrolling with React.js](https://jantu.hashnode.dev/how-to-implement-infinite-scrolling-with-reactjs?utm_source=hashnode&utm_medium=feed)

Introduction Any application that has a huge amount of data to show on a screen negatively affects the overall performance of an application. To overcome this performance degradation there are some widely used techniques. In this post, we will learn...

May 10, 2022 · 4 min read · jantu.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Jantu Deb](https://hashnode.com/@jantudeb)

@jantudeb · Agartala

  
[View profile](https://hashnode.com/@jantudeb)

Web developer - React & NodeJs

## Responses 7

Markdown supported · ⌘↵ to post

[Akshay Bhaskare](https://hashnode.com/@akshay123)

[Dec 23, 2022](https://hashnode.com/posts/how-to-implement-infinite-scrolling-with-reactjs/627ab5c9f543e7a92b804006/comment/63a555c33916c9c9a801f51c)

I have implement the above code for infinite scrolling in my project and its working fine, but there is a problem when all the data is loaded in the page it is still making API server call for more data when i scroll down, scrolling or loder should stop at the bottom when all the data is loaded, so please help me how i can achieve that

[Jantu Deb](https://hashnode.com/@jantudeb)

[Dec 23, 2022](https://hashnode.com/posts/how-to-implement-infinite-scrolling-with-reactjs/627ab5c9f543e7a92b804006/comment/63a555c33916c9c9a801f51c#reply-63a5c497c39f50da11a58688)

I guess backend can send additional information eg. `last_page:true` And accordingly frontend can stop asking for more data. This code should be easy to extend.

[Akshay Bhaskare](https://hashnode.com/@akshay123)

[Dec 25, 2022](https://hashnode.com/posts/how-to-implement-infinite-scrolling-with-reactjs/627ab5c9f543e7a92b804006/comment/63a555c33916c9c9a801f51c#reply-63a813beb1011ed9ec6d05c5)

Even suppose they send the **last\_page: true** from the backend but in the useeffect how i can set the condition based on the api response, right now i am loading 12 videos per page. It will be great if you implement the same in above code

[ADEOLU OLUWASEGUN DAVID](https://hashnode.com/@MOXIEDAV)

[May 15, 2022](https://hashnode.com/posts/how-to-implement-infinite-scrolling-with-reactjs/627ab5c9f543e7a92b804006/comment/6280b0d50094f2f13f5159bb)

It is really inspiring

[Israel Oyetunji](https://hashnode.com/@IsraelMitolu)

[May 13, 2022](https://hashnode.com/posts/how-to-implement-infinite-scrolling-with-reactjs/627ab5c9f543e7a92b804006/comment/627e1927cc45a3de295c6190)

This will come in handy. Thanks for sharing, Jantu!

[Sada mariya](https://hashnode.com/@sadaMariya)

[May 11, 2022](https://hashnode.com/posts/how-to-implement-infinite-scrolling-with-reactjs/627ab5c9f543e7a92b804006/comment/627ba3b1983a4ab69ce9cfba)

Very well explained.

[Bhakti Kharatkar](https://hashnode.com/@Bhaktee)

[May 11, 2022](https://hashnode.com/posts/how-to-implement-infinite-scrolling-with-reactjs/627ab5c9f543e7a92b804006/comment/627b6470e525f1b677135f8d)

Well written Jantu, insightful 👏

[rahul shukla](https://hashnode.com/@rahulcs754)

[May 11, 2022](https://hashnode.com/posts/how-to-implement-infinite-scrolling-with-reactjs/627ab5c9f543e7a92b804006/comment/627b40cef543e7a92b804c0f)

nice explain

[Tushar Tiwari](https://hashnode.com/@tushartiwari)

[May 10, 2022](https://hashnode.com/posts/how-to-implement-infinite-scrolling-with-reactjs/627ab5c9f543e7a92b804006/comment/627ade36199297a9505d4f80)

Very Insightful article! Loved it ❤
