Skip to content

Conversation

@jwallet
Copy link
Contributor

@jwallet jwallet commented May 18, 2023

the data used by FlatList can become quite large, to prevent React warning

VirtualizedList: You have a large list that is slow to update

you must only pass usefull data to renderItem and omit those that are not used. renderItem will compute much faster and the list will perform way better. React won't need to re-render that often if less props are passed, and it will do it faster because it does not have to recalculate every row because response was passed and is too big to evaluate between life cycles.

onRowClick : we get the actual row based on the id

@jwallet jwallet force-pushed the prevent-slow-update branch from 8ff3859 to 32e7708 Compare May 18, 2023 13:06
@alexbrazier
Copy link
Owner

Thanks @jwallet, looks like a good improvement. I'll try to get this tested and merged shortly

@jwallet jwallet force-pushed the prevent-slow-update branch from 32e7708 to fb00039 Compare May 21, 2023 01:43
@jwallet jwallet force-pushed the prevent-slow-update branch from fb00039 to f6fda47 Compare May 21, 2023 01:43
Copy link
Owner

@alexbrazier alexbrazier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jwallet, looks good

@alexbrazier alexbrazier merged commit c2a8f68 into alexbrazier:master May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants