I want to pass as a parameter a username to my drawernavigator, so that i can use it as the drawerlabel text.
Can anyone shine a light on this issue?
PS: I apologize for my poorly written question, i'm new to coding!
const RootDrawerNavigator = createDrawerNavigator({
Perfil:{
screen: PerfilStack,
navigationOptions: {
drawerLabel:(
//this is where i want the username
),
drawerIcon: (
<Image source={require('../../assets/user.png')} style={{height:50, width:50, marginLeft:'50%', marginRight:'5%'}}/>
),
},
},
export default createAppContainer(RootDrawerNavigator);
I'm calling this component here, on another file:
export default function Main() {
return (
<Navigator/>
);
}