React native app is taking time to load assets? - react-native

My react native android app is not loading some png files ,and taking time to load them ,sometime it loads sometime it wont,all the png are static files

Try using react-native-cached-image to cache the images.
npm install react-native-cached-image --save
Its been a ongoing bug in the react native community

The problem is resolved.Actually the pixels of images are very large like which make the app jerking. So its better to use the icon having proper resolution like 64X64 128X128.In my case the icons resolutions are 1400X1200 which doesn't load the image in android .

Related

App clip size too big for react-native app

We have a react native app. Now we are trying to fit app clip into it. The issue we are facing is with the package.json file. The app requires a lot of packages that the app clip does not, but due to a single package.json file, the appclip size is getting bloated up unnecessarily. Has anyone faced this issue before? Is there a way to minimize this problem?
I was facing a similar issue and what I did is to skip the native libraries for the app clip iOS target in Podfile using this technique: https://github.com/react-native-community/cli/issues/1179#issuecomment-756539463

How can I check the version of a Lottie file?

I am building a react native app using expo and trying to use a couple lottie files using the lottie-react-native library. When I use the iOS simulator the files load fine, but when I try to run the app on my actual iPhone I get this warning:
"ReactNative.NativeModules.LottieAnimationView.pause did not have a corresponding prop defined
in the mock provided to SafeModule"
I know that expo relies on Lottie v2 so v3 files will cause the app to crash, but is it normal for the Lottie animations to work on the simulator but not the phone? And is there a way for me to check if an animation is v2? I can't seem to find any kind of indication of version when browsing the animations.
Thanks to anyone who can help!

How to reduce apk or aab file size in react native using expo?

I have just started react native with expo. My first app has only one App.js file and one component of counter. When I have built it, surprisingly my apk size was 49MB :open_mouth: I wonder why its so and how to reduce it without ejecting???
Expo is purely for development purpose , and its only recommended for production if your app is very basic and doesnt have much of native functionalities. Even expo is slower and has much limitations. The larger size of expo is due to the expo wrapper which sits on top of react native , which has a lot of in built modules and thus making it larger.
Recommendation: If you want to lower the apk size , you should migrate to pure react native as expo doesnt give the power of actually decreasing the app size since its handled by expo.
You can even check this link expo -size which also had the same query .
Hope it helps.

How can I pre load assets before App load in react native without using expo?

I'm trying to create a game in react native and I have lots of graphical objects and images in my screens . so I want to be sure my screens load without delay.
for instance I have a problem with "ImageBackground",
it loads background after my screen rendered an it's not professional.
I searched and I found AppLoading on Expo but I'm not using expo in my project. so could you please help me with some advices?
thanks.

React Native image performance

In my React Native app I use image resources in the bundle for some of the UI elements. On some of the screens, I download images from the web for FlatList Items. When I switch to a UI that is image heavy, the images that I use for the UI elements loaded from the bundle show almost after all the images in the FlatList loads which seems very unprofessional for a native app.
I searched the web for performant image loaders, found some but since I use Expo for development, I can't use native plugins.
Can someone direct me to useful resources to overcome this problem?