I woke up at nine this morning and was flattered. Don't say much nonsense, start the code, are you ready? In addition, the source code of this series of articles has been uploaded to GitHub, please get it yourself!
Pre-load | cache
Expo provides a apploading method, you can use it to do some background loading data, caching and other work, when he did not cache the required resources, your screen will not be displayed, so this method, I personally feel is always so lame. The previous figure illustrates:
In the screen will appear card white situation, what reason? I let it in the Apploading, the app loaded the time to do some load resources, the right picture is my simulated loading resources, with the For loop, the result program starts, he will walk apploading, do the things inside him, so the application will be card white, obviously this is not what we want, Below we try to splash, I can use Splash.
Got my smile, splash in the expo configuration file configuration some will be able to,
If so, I am still not satisfied, we can be presumptuous to use the third party, even I wash the one also do.
Two third parties are recommended here, not necessarily the best but I found it.
Splash a Splash Two
Since this is written in Splash, I also review some long ago wrote an article: react native first download the app's welcome page + each launch of the app's launch page design by the way in this project implementation.
Seemingly a little bit of a problem, the last time I was in the native hybrid mode, to the <Image> component to add sub-components no error, this time in the expo, he did not let me do so, it is embarrassing!
So ah, I suggest to do splash directly with the third party, simple rough easy!
I don't want to mention this splash, let's talk about push notifications, message push service
Push notifications| message push
Simply tested his push API, saying I didn't register,
Take you from the zero-learning reactnative development of cross-platform app development (VI)