I am using react-infinite-scroll-component library to implement infinite scrolling feature and then I am mapping 10 videos at a time after about 50 videos being mapped my browser is crashing. Is there any way to fix this? I am trying to implement tiktok like feature in my website.
This is my map function where I map a video player
{data.map((items,i)=>{
return (
<VideoPlayerShorts
loop={true}
sources={[
{
src: items.video_details.trim_video_link,
type: "application/x-mpegURL",
},
]}
/>
This is my infinite Scroll feature
<InfiniteScroll
dataLength={data.length}
next={getMoreData}
hasMore={hasMore}
>
</InfiniteScroll>