Reputation: 13588
I've used expo for a while now and have switched to react-native-init without expo.
I've been very comfortable working without expo (thanks Github) but somehow I am unable to find a solution with much googling, for a similar feature to AppLoading in Expo ( https://docs.expo.io/versions/latest/sdk/app-loading ). Maybe I'm not using the correct keywords, I keep getting results for react native fast image etc which just preload images from cache.
I've already set up the Launch screen in Xcode, I would like to network request, load some data into my redux store, preload images and some fonts, before my Launch screen switches to my first screen.
Can someone provide me with a solution or a link to the solution?
Upvotes: 13
Views: 17203
Reputation: 2184
As of 2022,
You may try react-native-bootsplash
In case, react-native-splash-screen
is not suitable for you.
Upvotes: 4
Reputation:
I managed it to just do a simple loading placeholder. While loading you have loadingState == true. If it finished to fetch user data e.g. it will load your normal screen, navigation or whatever
if (loginState == true){
return(
<View style={{flex: 1, justifyContent: "center", alignItems: "center", backgroundColor: "#000000"}}>
<Text style={{color: "#FFFFFF", fontSize: 27, fontFamily: "Poppins-SemiBold"}}>Loading</Text>
<ActivityIndicator size="large" color="#FFFFFF" />
</View>
)
};
Upvotes: 0