这是所有路线。我想在进入主屏幕时完成启动屏幕。有可能吗?
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
答案 0 :(得分:0)
使用Actions.replace()我们可以替换场景,将屏幕替换为主屏幕或登录屏幕很有用,替代解决方案是(推荐)Actions。({type:'reset'})