I am using wix/react-native-navigation - v1 in my react native project and I want to launch my App based on a condition as follows:
- Launch App
- Read credentials from storage (AsyncStorage)
- If credentials found, then
- Start App with Home screen
- Else
- Start App with Login Screen
How can I achieve this?
I have 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"
}
});