【发布时间】:2019-04-17 15:48:49
【问题描述】:
我在我的 react native 项目中使用wix/react-native-navigation - v1,我想根据以下条件启动我的应用程序:
- 启动应用程序
- 从存储中读取凭据 (AsyncStorage)
- 如果找到凭据,则
- 使用主屏幕启动应用程序
- 其他
- 使用登录屏幕启动应用程序
我怎样才能做到这一点?
我有 index.js
import App from './App';
App.js
...
Navigation.registerComponent("myApp.AuthScreen", () => AuthScreen);
Navigation.registerComponent("myApp.HomeScreen", () => HomeScreen);
...
// Start a App
Navigation.startSingleScreenApp({
screen: {
screen: "myApp.AuthScreen",
title: "Login"
}
});
【问题讨论】:
标签: react-native wix-react-native-navigation