I am facing an issue where I need to render a lot of grid elements on a component, starting out the grid will have 2,500 items(50 horizontally and 50 vertically) and this grid view needs to be scrollable in both directions and diagonally as well, I was able to do this by applying this prop directionalLockEnabled={false}
to the regular react-native ScrollView
but since I have a lot of items being rendered the ScrollView
performance is suffering greatly, I wanted to replace this with a FlatList
but couldn’t find a way to make it scrollable in all directions.
My question is if there is a way to make the ScrollView
performant or to use FlatList
and make it scrollable in all directions? or a better way to implement this?
2
Answers
you can use Flashlist as it is very performant and work in all the directions
Installation Guide
Usage
Here is the complete answer