Im sending the data "item.email" from screen X to screen HomeParent How can I retrieve the data in the HomeParent screen?
renderItem=(item,index)=>{
return(
<View style={styles.listItemContainer}>
<TouchableOpacity onPress={()=>this.props.navigation.navigate("HomeParent",item.email)}>
<View style={styles.listItemTitleContainer}>
<Text>Hello</Text>
</View>
</TouchableOpacity>
</View>
)
}
Pass it as a object field
<TouchableOpacity onPress={()=>this.props.navigation.navigate("HomeParent",{mail:item.email})}>
and use getParam like this,
const email = this.props.navigation.getParam('mail')