I think you should have to define the user property in the State object
class HomeScreen extends Component{
state = { user: ''}
displayData = async () => {
try{
let user = await AsyncStorage.getItem("UserEmail");
this.setState({user:user})
}catch(error){
alert(error)
}
}
render(){
return (
<View>
<TouchableOpacity onPress={this.displayData}>
<Text>Click to display data</Text>
</TouchableOpacity>
{this.state.user ? <Text>Welcome {this.state.user} </Text>: null}
</View>
)
}
}