I need to print the name of a user in the drawer navigation part but I have the data saved in the state but I do not know how to access them and probe passing props and passing the argument but I still do not get anything.
The problem is that it is all in a .js here I attach my code
Here is where I have saved the data
export default class index extends Component{
constructor(props){
super(props)
this.state={
uid:'',
email:'',
Nombre:''
}
}
And here is my declaration of drawernavigation
const RootDrawer = DrawerNavigator({
Home:{screen: Home},
Perfil:{screen: Perfil},
Cursos:{screen:Cursos}
},{
drawerBackgroundColor:'#F64747',
contentOptions:{
activeTintColor: 'black',
activeBackgroundColor: '#eeeeee',
inactiveTintColor :'white'
},
contentComponent: (props) => (
<Container>
<View style={styles.drawerHeader}>
<ImageBackground source={require('./../images/material-design-4k.jpg.png')} style={{flex:1}}>
<Body>
<Image
style={styles.drawerImage}
source={require('./../images/user.png')} />
<Text style={styles.texto}>
</Text>
AQUI ES DONDE QUIERO IMPRIMIR EL DATO
<Text style={styles.texto}>
Correo
</Text>
</Body>
</ImageBackground>
</View>
<Content>
<DrawerItems {...props} />
</Content>
</Container>
)
})