You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the ViewToken page in the docs it shows that the index property is optional. This is not explained in any further detail by the docs.
What is the problem?
It is unclear to me in what situation this property would be null. This object is used as a parameter for the onViewableItemsChanged callback in VirtualizedList so it is in turn also used in both FlatList and SectionList. This makes me think there wouldn't be a situation where index would be null.
How can we address it?
Update the description of the index property on ViewToken to clarify in what situation it could be null.
If anyone knows a resource like an issue in the react-native repo or a from post that discusses this or can explain it to me I can also make a PR to clarify the description on the property.
Why is it important?
It is currently ambiguous why the index property on ViewToken is marked as optional.
Who needs this?
Anyone using the onViewableItemsChanged prop and relies on the indexes of the callback.
The text was updated successfully, but these errors were encountered:
👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.
Description
On the ViewToken page in the docs it shows that the
index
property is optional. This is not explained in any further detail by the docs.What is the problem?
It is unclear to me in what situation this property would be
null
. This object is used as a parameter for theonViewableItemsChanged
callback inVirtualizedList
so it is in turn also used in bothFlatList
andSectionList
. This makes me think there wouldn't be a situation whereindex
would benull
.How can we address it?
Update the description of the
index
property onViewToken
to clarify in what situation it could benull
.If anyone knows a resource like an issue in the react-native repo or a from post that discusses this or can explain it to me I can also make a PR to clarify the description on the property.
Why is it important?
It is currently ambiguous why the
index
property onViewToken
is marked as optional.Who needs this?
Anyone using the
onViewableItemsChanged
prop and relies on the indexes of the callback.The text was updated successfully, but these errors were encountered: