Hey so lets say I got aFlatList and want to change its renderItem how would I do it?
<FlatList
data={this.data}
renderItem={{item}} => <Video id={item.id}>}
onViewableItemsChanged={(changed)=> console.log(changed)}
/>
On the piece of code above how could I change the <Video /> to include a paused property once onViewableItemsChanged is triggered ?
Thanks in advance
You can add
setStatein theonViewableItemsChangedto store the changes then use that in therenderItemto pause the video.