Ambiguity on why the index property in ViewToken is marked optional
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react-native
- Domain
- documentation
Research direction
Start with the ViewToken page in the React Native documentation and inspect the description of its optional index property. Review how ViewToken is used by the onViewableItemsChanged callback in VirtualizedList, FlatList, and SectionList, then confirm the situation that permits a null index. Update the property description to explain that situation and verify the rendered documentation.
Written by the indexing model from the issue text.
Description
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 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.
- Dominant language
- MDX
- Stars
- 2.2k
- Forks
- 6.3k
- Avg merge
- 11h 37m
- Merged PRs (30d)
- 19
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react/react-native-website
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
react/react-native-website#5217 ·
-
Integration with Existing Apps: Podfile example does not use `use_react_native!`, is incomplete Open👋 Good first issue
Difficulty 1/5 Under an hour Newbie friendliness 78/100
react/react-native-website#2958 · 2 comments ·
-
:ghost: Missing Docs 👋 Good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
react/react-native-website#889 · 5 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
react/react-native-website#5216 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
react/react-native-website#5154 · 6 comments ·
All issues in react/react-native-website
Similar issues
-
Area: Excel support
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
orbeon/orbeon-forms#7893 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
kb-infra-drift
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OCHA-DAP/ds-knowledge-base#653 · 1 comment ·
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 90/100
EclipseFdn/open-vsx.org#13419 ·