Understanding the need for native dependencies
Looking for some at least high-level understanding of why the splash screen implementation seems to rely on some native dependencies - this and other libraries for that, require linking some libs + some custom setup both for Android and iOS without giving much explanation. Before doing some research, I hadn’t anticipated that the common approach for such a potentially trivial screen is using these kinds of libraries.
My reasoning was simply: Make SplashScreen the initial route of the navigation tree, trigger some async action to verify auth status, immediately redirect to some meaningful route after that.
Could some kind soul explain the motivation / bigger picture behind this (and similar libraries) or share some useful resources?
Disclaimer: I'm speaking from my limited knowledge and personal experience.
The issue with your approach is that it assumes that the first screen that the app will load when opened will be rendered by React Native, but that is not the case. When the app is launched, the very first screen is actually rendered natively while React Native is being loaded and takes over. For that reason, your app would experience a jump from the natively-rendered screen to the first component rendered by React Native and making that look seamless can be challenging. While I haven't used this library yet, I believe that what it allows you to do is to keep displaying that natively rendered screen even after RN finishes loading and while you perform any async actions, and after that's done you can hide the splash screen and display your main app content.