Skip to content

onViewableItemsChanged - getting an ID of an item #577

Answered by fortmarek
chrisedington asked this question in Q&A
Discussion options

You must be logged in to vote

I use flashlist to render Items in fullScreen, and it render 2 items each time when I scroll, is there any possible way to render 1 item each time?

I suppose the number of rendered items is related to how many items are loaded during the first render?

This is because when I try to use the onViewableItemsChanged to get the item.id of the currently visible item on screen (videos show as full screen), I get multiple results and an undefined ID on first load.

In the documentation we already call out that if you are tracking the time a view becomes (non-)visible, use the timestamp property. We make no guarantees that in the future viewability callbacks will be invoked as soon as they happe…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by chrisedington
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants