I’m working with a FlatList in React Native that renders different components. Each rendered component has JSX content which includes a label or section name (like a tag). I want to track which sections are visible on screen as the user scrolls.
I’m using viewabilityConfig with the FlatList, and I want to know:
Is there a way to retrieve the corresponding section name or label of each visible item based on its index from the FlatList?
I know that using viewabilityConfig and the onViewableItemsChanged method in FlatList, we can track the items rendered by the FlatList. However, is there a way to track specific sections or labels inside those items — sections that are rendered by the components returned from FlatList's renderItem?