0

I am new to react-native. I am trying to use props and navigation in a const function. I do not know how to do that.

    render() {
return (
  <View style={styles.container}>
      {this.state.signedIn ? (
      <LoggedInPage name={this.state.name} photoUrl={this.state.photoUrl} />
    ) : (
      <LoginPage signIn={this.signIn} />
    )}
    <TouchableOpacity 
     onPress={() => {this.props.navigation.navigate('About You')}}
      style={styles.submitButton4}>
      <Text style={styles.buttonText2}> Next </Text>
    </TouchableOpacity>
   </View>
   );

}
const LoggedInPage = props => {
return (

Welcome {props.name}
<Image style={styles.image} source={{ uri: props.photoUrl }} />

Change photo

<TouchableOpacity
onPress={() => {this.props.navigation.navigate(‘registration’)}}
style={styles.submitButton4}>
Next

)
}