Fork me on GitHub

I’m not a fan of the :> syntax because it’s impossible to google so newcomers to the code may have no idea what it is

👍 8
Michaël Salihi19:08:05

Yes I agree, is better to know what is behind thoses sugar syntaxes.


*newcomers = me the first time I saw that


Can someone tell me how to easily measure startup time of a react-native app?


You could rig something up around the AppLoading api from expo. It’s a component that you display from the app root until you get notified that the system is ready to display your app (after caching fonts, images,etc.). So basically record the time at the beginning of the app entry point, and then again from the onFinished callback on the AppLoading component. This wouldn’t be an exact measurement - you would miss the bootstrapping React Native has to do before calling your entry point, but assuming that’s relatively constant, it would still measure your app’s contribution to startup time. Probably worth a shot. And note, you don’t have to be using Expo - almost all of the Expo libraries have been modularized now, so you can add them to a plain RN app.