Please tell me how to dynamically control initialRouteName in react-navigation components.

use the react-navigation component, how to dynamically set the default page initialRouteName for routing,

clipboard.png

is that after opening app, the user does not log in and the login page is displayed by default. If the user is logged in, open app to display the applicable main page by default


https://reactnavigation.org/d...

keyword: createSwitchNavigator

Menu