DEV Community

Discussion on: Building Infinite scroll in React with hooks and Intersection Observer

Collapse
 
tmurvv profile image
Tisha Murvihill

I love this code, but I would like to pass in the data as a prop so that on a rerender it will access a completely new data set via props and then infinitely scroll on the new data set. Currently every time the component rerenders it continues to show whatever data was initially passed in on the first mount.

Ideas?