I wanted to add an infinite scroll component to one of my react components.
I am using react-infinite-scroll-component
and want to add fetch more after a certain length.
Here is the component and I want to make an Infinite scroll on new Items
let newItems = logs.filter(function(log){
return log.completed === false
})
return (
<div>
<div>
<h1>ALL</h1>
{
newItems.map((item)=>(
<Item key={item.id} logs={logs} />
)
)
}
</div>
</div>
The code snippet provided in react-infinite-scroll-component
examples I want to achieve similar with 5 elements from newItems list.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…