You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to refresh the data in the InfiniteScroll component when I delete an item #372
I am trying to delete an item from the component when I delete an Item. But it is not re rendering or refreshing the data.
Is this the default or expected behavior?
Is there a way to refresh the data without having to call the API again to re fetch the data?
Reacted by Philippe, sashaoverview, Lee Han Ul, Junlin-Zhu, Pedram Afrasiabi, Maxim Pilipenko, Yurii Rybak, simon-tse-dtt, Sam Edwards and official_dulin
InfiniteScroll is a scroll container, it does not manage your data. It renders whatever children you pass in. When you delete an item, update your data array in state and re-render the list, the component will reflect the change automatically.
Activity
iamdarshshah commentedon Apr 12, 2026
InfiniteScrollis a scroll container, it does not manage your data. It renders whateverchildrenyou pass in. When you delete an item, update your data array in state and re-render the list, the component will reflect the change automatically.No API re-fetch needed, just update your local state. Does that help? Happy to answer follow-up questions.