I want to display the text "scrolling" when I am scrolling but nothing happens. It does not show the text. What I am doing wrong ?
code:
<List
innerElementType="ul"
itemCount={data.length}
itemSize={20}
height={700}
width={400}
>
{({ index, style, isScrolling }) => {
if(isScrolling) {
return <p style={{color: 'black'}}>scrolling</p>
} else {
return (
<li style={style}>
{data[index]}
</li>
);
}
}}
</List>
useIsScrollingprop on the List. If it is not thereisScrollingis not available. You see an working example in the following Codesandbox Demo. Also mentioned in the example