我尝试了以下3种方法.第一个是我目前用于反应原生项目的android启动画面.
@H_502_1@>使用其他人编写的npm包.
@H_502_1@参考:https://github.com/remobile/react-native-splashscreen
>创建SplashScreen组件并在之后重定向. @H_502_1@参考:How to create some kind of Splash screen/Launching screen,which disappears after App loaded? (React Native)
>本机在java代码中. @H_502_1@参考:https://www.bignerdranch.com/blog/splash-screens-the-right-way/ @H_502_1@我在initialRoute的componentDidMount()中有一个获取请求. @H_502_1@使用上面列表中的第一种方式在显示启动屏幕时执行请求. @H_502_1@而第二种方式,需要等到SplashScreen组件卸载. @H_502_1@第三种方式是编写和维护的代码稍多.
>创建SplashScreen组件并在之后重定向. @H_502_1@参考:How to create some kind of Splash screen/Launching screen,which disappears after App loaded? (React Native)
>本机在java代码中. @H_502_1@参考:https://www.bignerdranch.com/blog/splash-screens-the-right-way/ @H_502_1@我在initialRoute的componentDidMount()中有一个获取请求. @H_502_1@使用上面列表中的第一种方式在显示启动屏幕时执行请求. @H_502_1@而第二种方式,需要等到SplashScreen组件卸载. @H_502_1@第三种方式是编写和维护的代码稍多.