`Agenda` list Items incorrectly rendering on update
See original GitHub issueHello – I think I found a bug in the AgendaList
due to the current key extraction.
When I navigate back in the agenda, e.g. from a Monday to Sunday, and if both of those days have arrays of events, the FlatList isn’t rendering the correct item. Instead, an item previously rendered gets used. I’m pretty sure this is because of the string coercion of the indices used in the current key extraction:
keyExtractor = (_item: DayAgenda, index: number) => String(index);
this seems to me like a pretty good example of the index-key anti pattern described here: https://robinpokorny.medium.com/index-as-a-key-is-an-anti-pattern-e0349aece318
This seems straightforward to fix, by at least exposing a keyExtractor
prop to the AgendaList
.
I’ll put together a minimal reproduction of this when I get the time.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:15
Top Results From Across the Web
ReactNative Agenda not rendering any items - Stack Overflow
I am using the Agenda from wix/react-native-calendars in my code. The problem is its not showing any items the way its intended to...
Read more >When does React re-render components? - Felix Gerschau
React is known for providing a fast user experience by only updating the parts of the UI that have changed. When looking into...
Read more >Metaverse beyond the hype: Multidisciplinary perspectives on ...
The paper concludes by proposing a future research agenda that is valuable ... it is necessary to recognize and render scenes and objects....
Read more >OnBase Troubleshooting Common Issues
In the Web Client, click on the Document dropdown arrow and choose “User”. Then, click the dropdown arrow next to “Mailbox” and click...
Read more >Known issues with Outlook Desktop Shared Calendar ...
This article discusses issues after you enable Shared Calendar Improvements as detailed here: Outlook calendar sharing updates.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@minaairsupport Hi. Care to submit a PR on this?