这里是所有路线。我想在进入主屏幕时完成启动画面。那可能吗?
const Routes = () => (
<Router>
<Scene key = "root">
<Scene key = "splash" component = {SplashScreen} hideNavBar= {true} initial = {true} />
<Scene key = "login" component = {LoginScreen} hideNavBar= {true} />
<Scene key = "home" component = {HomeScreen} title = "Home" />
<Scene key = "signup" component = {SignupScreen} hideNavBar= {true} />
<Scene key = "phoneverification" component = {PhoneCodeVerification} hideNavBar= {true}/>
<Scene key = "signupwithemail" component = {SignupwithEmail} hideNavBar= {true} />
<Scene key = "emailverification" component = {EmailVerification} hideNavBar= {true} />
<Scene key = "success" component = {SuccesScreen} hideNavBar= {true} />
<Scene key = "setupprofile" component = {SetupProfile} hideNavBar= {true}/>
<Scene key = "forgotpassword" component = {ForgotPasswordScreen} hideNavBar= {true} />
<Scene key = "resetcodephone" component = {ResetCodePhoneScreen} hideNavBar= {true} />
<Scene key = "resetcodeemail" component = {ResetCodeEmailScreen} hideNavBar= {true} />
<Scene key = "resetpassword" component = {ResetPasswordScreen} hideNavBar= {true} />
</Scene>
</Router>
)
export default Routes
使用 Actions.replace() 我们可以替换场景 将屏幕替换到主屏幕或登录屏幕很有用 替代解决方案是(推荐)Actions.({type:'reset'})
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句