I need to show a 100 pages (some text, image and a few buttons on each) in some cases so I'm wondering about possible performance issues. Android implementation using ViewPager2 (with recyclerview underneath) which seems like a good fit for the task. Could react-native-viewpager handle a 100 pages or should I use something else (maybe native?) for that?
Hey @olhapi
Currently,ViewPager does not support lazy loading on JS side (https://github.com/react-native-community/react-native-viewpager/issues/104). As you mentioned, native side is prepared for it, but the problem is with JS implementation.
All views will be initialized in memory eagerly (View should be created, if needed in lazy way). In above issue, there is some PoC, how it can be implemented. You can try to tweak a JS part to support lazy loading. In case of any help, feel free to ask.
should I use something else (maybe native?) for that?
Depends on feature, you need to implement. Probably you can use FlatList, which support lazy loading.
For native implementation you can try for ios
Hello @troZee. I'm just diving in the react native world and not ready to mess with what I don't know but rather pick something created by experienced developers. Thanks for the answer.
@troZee great news. Thanks for letting me know.