H.Epstein
H.Epstein

Reputation: 731

Trigger a function when user scrolls through a section list

I'm new to react-native.

I'm trying to build a component with a section list and a segment tab controller that holds the list sections.

I need to know what section the user is currently scrolling, I want to be able to set the selected segment as the user slide through the sections.

Upvotes: 0

Views: 181

Answers (1)

Marc Armgren
Marc Armgren

Reputation: 160

onViewableItemsChanged is probably what you want to use.

https://facebook.github.io/react-native/docs/sectionlist#onviewableitemschanged

Upvotes: 1

Related Questions