Onscroll setstate triggering re render in section list pure component

41 views Asked by At

Hi All im working with a section list with collapsible headers and I'm using a onscroll trigger on section list to pop up a bottom navbar after an offset of 200

Everything works fine but the setstate in my onscroll is causing a re render of my section list even though its a pure component which inturn gives me the error

VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.

Here is the expo snack, i have added a console logs in menusSectionList.js file ,Any advice would be really helpful

0

There are 0 answers