Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a recommended approach for implementing infinite scrolling? #43

Open
chrisjhoughton opened this issue Feb 2, 2020 · 1 comment

Comments

@chrisjhoughton
Copy link

Hi there, amazing library you've built out!

One of the things that's really important for us is the ability to have an infinitely scrolling list. I'm thinking it might be possible to implement this with a sub-component that triggers an event to the parent on mount, but I'd love to know if anyone has implemented this already?

@pupudu
Copy link
Owner

pupudu commented Feb 2, 2020

Hi @chrisjhoughton
Thank you for getting involved.

This library is based on react-window. And according to their docs, using the react-window-infinite-loader seems to be the preferred way of doing what you need.
https://github.com/bvaughn/react-window#can-i-lazy-load-data-for-my-list

I haven't tried that myself yet. But from a quick look, I feel that the integration would just work. I will give this a go tomorrow or day after and will link a codesandbox. If you manage to do it yourself before that, please let us know.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants