DEV Community

Cover image for viewabilityConfigCallbackPairs
Hatta Food
Hatta Food

Posted on

viewabilityConfigCallbackPairs

I have one question now is it limitation to React-Native orr.. it is not possible by any means

Problem:
I have nested flatList

How to apply or get the ItemLayout orr viewabilityConfigCallbackPairs

so that i can perform certain actions within that child

renderItem
/>
const renderItem = ()=>{
onScroll={() => {
console.log('onScroll =>');
}}
onLayout={event => {
console.log('onLayout =>', event.nativeEvent.layout);
}}
getItemLayout={(data, index) => {
return {length: 100, offset: 100 * index, index};
}}
viewabilityConfigCallbackPairs={
viewabilityConfigCallbackPairs.current
}/>

Top comments (0)