react-native-store-view
react-native-store-view copied to clipboard
Store popup is slow?
Is this expected? I notice when I open the store modal it takes around 5-10. Is this usual?
+1
It’s network dependent but it can take a while, mostly for the screenshots / app preview thumbs. That’s just the speed of the underlying native calls so not a lot we can do.
If you prefer you can present the view before it’s finished loading, the user will see the product page immediately appear and gradually load in front of them - the App Store app does this. I'd recommend waiting for the 'loading' event just to be sure there aren't artifacts remaining from a previous load.
This would feel much more responsive if you're loading on-demand:
StoreViewManager.loadProductWithParameters({ /* .... */ });
StoreViewManager.once('loading', () => StoreViewManager.presentViewController());
If you only have one App Store link you may find it useful to optimistically pre-load it, ready to present when tapped. The ~~underlying~~ current API is a singleton though so it’s not possible to preload more than one product (although I suppose there might be a cache involved within the store view - I haven’t experimented with this).
(Edit: It looks like it might theoretically be possible to pre-load multiple views but this module doesn’t currently support that. Let me know if that’d be useful, PRs welcome also)