I'm a newbie in React Native and I want to test react-native-navigation
by wix
I have a SingleScreenApp with a drawer. See below :
Navigation.startSingleScreenApp({
screen: {
screen: 'example.HomeScreen',
title: 'Home',
navigatorStyle: {},
navigatorButtons: {}
},
drawer: {
// optional, add this if you want a side menu drawer in your app
left: {
screen: 'example.LefMenu',
passProps: {},
disableOpenGesture: false,
fixedWidth: 500
},
style: {
drawerShadow: true,
contentOverlayColor: 'rgba(0,0,0,0.25)',
leftDrawerWidth: 50,
rightDrawerWidth: 50
},
type: 'MMDrawer',
animationType: 'door',
disableOpenGesture: false
},
passProps: {},
animationType: 'slide-down'
});
To have a menu-like behavior, I want to change the main screen of the SingleScreenApp (by clicking a button or other interaction).
I insist that I want to change/remplace the main screen, not pushing or showing a modal.
Should I start another SingleScreenApp with a root screen different screen ? Should I use "resetTo" method ? What is the best in term of performance ?
Thanks a lot !