简体   繁体   中英

Best infinite scroll tool/component for JS React website?

I'm very new to JavaScript and currently using JSX to design a website. I am hoping to add an infinite scroll component where the user scrolls to the bottom of a list of, say, 5 images, and then 5 more load, etc.

I have built my own rest API server and plan to implement my JS such that upon each user scroll to the bottom, it will call on this API to load the data for another 5 images; however, I am lost on how to best handle this scroll event by the user.

I am trying to find a tool/component that would help me implement this scroll that is already embedded in the standard React library. It is important that this is not something I have to install outside of the React library . I have read through tons of React documentation and SO posts, but have been unable to find one- could someone point me in the right direction?

This one should do the work react-infinite

Or native

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM