React native 未定义'_这2.道具.导航.导航';

React native 未定义'_这2.道具.导航.导航';,react-native,react-navigation,React Native,React Navigation,我有问题,我想导航到注册从登录模式。如何解决这个问题 如何在模式中导航 import React,{Component}来自'React'; 从“react native”导入{Alert,StyleSheet,Text,TouchableOpacity,View,Dimensions,TextInput}; 从“react native modalbox”导入模态; 从“../../../assets/icon/Lock.svg”导入锁; 从“../../../assets/icon/Us

我有问题,我想导航到注册从登录模式。如何解决这个问题

如何在模式中导航

import React,{Component}来自'React';
从“react native”导入{Alert,StyleSheet,Text,TouchableOpacity,View,Dimensions,TextInput};
从“react native modalbox”导入模态;
从“../../../assets/icon/Lock.svg”导入锁;
从“../../../assets/icon/User.svg”导入用户;
var screen=Dimensions.get('window');
类登录扩展组件{
建造师(道具){
超级(道具);
}
showLogin=()=>{
this.refs.myLogin.open();
}
closeLogin=()=>{
this.refs.myLogin.close();
}
render(){
返回(
)
}
}
这个按钮呢

<TouchableOpacity onPress={() => this.props.navigation.navigate('Register')}>
    <Text style={{ color: '#024379', fontWeight: 'bold' }}>Daftar Disini</Text>
</TouchableOpacity>
this.props.navigation.navigate('Register')}>
达夫塔迪西酒店

使用带有导航的
可以访问组件中的导航道具


有关参考信息,请参见创建导航服务,然后在需要的位置导入并使用它查看文档=>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Register')}>
    <Text style={{ color: '#024379', fontWeight: 'bold' }}>Daftar Disini</Text>
</TouchableOpacity>