简体   繁体   中英

Is there a way to show splash screen on **command in** react-native?

I was working with react-native and I had a need to show splash screen/ or a loading screen when I log-in my user. How can I use the default splash screen? or do I have to implement one using state variables?

dependencies: latest version of every modules.

The package react-native-splash-screen includes methods to programmatically show/hide the splash screen. See the API here

I usually make a custom splash screen with a timer of 2 seconds. Then it navigates to the first screen. Find more here .

Here is an awesome package that will show/hide splash based on demand https://github.com/zoontek/react-native-bootsplash

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM