-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change StackNavigator order #2683
Comments
if you are using redux you can save a toggle there and use it to set initial route, some thing like:
|
Full Solution
in Language Screen
in Navigator
|
@amorenew, can you give a gist or a link to your full full solution, I'd like to see how you realised GeneralPref and getInitialScreen() |
@6axter82 GeneralPref is just async storage to save user is signed in.
|
Hey, and what about Preferences.js? How does that look? You just have a set of keys stored and fill them as key-value pairs? Can you show it as well? Thanks a lot! |
@6axter82
|
Hi can you help me here... /* @flow */ import React from "react"; import { Platform } from "react-native"; import Artboard from "./src/artboard/Artboard"; import getTheme from '../native-base-theme/components'; import Icon from 'react-native-fa-icons'; import commonColor from '../native-base-theme/variables/commonColor'; const AppNavigator = StackNavigator(
}, { export default () => ; how to change initialRouteName if logged in right now my initialRouteName Artboard if logged in then i want in place of Artboard it will go to home screen... please help |
Artboard: { screen: Artboard} //for Auth check,user is logged in or not. 2.your App navigator which initial screen is Home. const AppNavigator = StackNavigator( { Now we have done ,thanks. |
If you are worried about stack state change and it runs from start after reloading you can check this answer Check my answer |
I am using the react-native-restart library for restarting the app so I can change the app language in the runtime. After I restart the app I want to change the first StackNavigator screen in the react-navigation library after restarting the app.
Navigator class is like this
in screen 2 I change the language and restart the app by the following function:
my question on stackoverflow
The text was updated successfully, but these errors were encountered: