I've been trying to create an app to learn react native, which has a login interface where upon successful authentication, the user gets redirected to a homepage with navigation drawer - the standard for most mobile apps today.
I've used react-native-router-flux and react-native-drawer-layout to implement this.
I got the drawer working but once I get to homepage (Recipes) from login page I can see a back button being shown, and I can't seem to set a drawer icon as stated in the react-native-drawer-layout API no matter what I try.
I think the problem is with my Router, the scenes defined for this particular scenario is as follows.
const App = () => {
return (
<Router navigationBarStyle={styles.navBar}
titleStyle={styles.navTitle}
sceneStyle={styles.routerScene}
barButtonIconStyle={styles.barButton} >
<Scene key="root">
<Scene key="login"
component={Login}
title="Login"
hideNavBar = {true}
initial
/>
<Scene
key="recipes"
component={Recipes}
title="Recipes"
hideNavBar = {false}
hideBackImage = {false}
//backButtonImage = {require('image!ui_nav_bar_hamburgher_icon')}
onBack = {() =>{return null;}}
rightTitle = "Bad Hombres"
onRight = {() => { Alert.alert(
'No puppet, No puppet',
'You\'re the puppet!',)}}
leftTitle ="Bigly"
onLeft = {() => {Alert("Such a nasty woman..")}}
// leftButtonImage={require('image!ui_login_email_icon')}
panHandlers ={null}
/>
</Scene>
</Router>
);
}
Can someone please help me figure out what I'm missing here? Appreciate it a lot.