DrawerLayoutAndroid 上的 TouchableHighlight
TouchableHighlight on DrawerLayoutAndroid
我正在使用 DrawerLayourAndroid
。我想通过 DrawerLayout
中的 TouchableHighlight
导航到另一个视图。这是我的 DrawableLayout
:
代码
var drawerLayout = (
<View>
<TouchableHighlight onPress=
{()=>this.props.navigator.push({name:'secView', component:secView})}>
<Text>move</Text>
</TouchableHighlight>
</View>
);
但是它有错误“undefined is not an object (evaluating '_this.props.navigator')
”。
我怎样才能让它发挥作用?
我post编辑这个post时使用了react-native的导航器。我在这里通过使用 react-native-router-flux 解决了这个问题。
https://github.com/aksonov/react-native-router-flux
我在自定义抽屉中使用了 Actions.name(params),它有效!
我正在使用 DrawerLayourAndroid
。我想通过 DrawerLayout
中的 TouchableHighlight
导航到另一个视图。这是我的 DrawableLayout
:
var drawerLayout = (
<View>
<TouchableHighlight onPress=
{()=>this.props.navigator.push({name:'secView', component:secView})}>
<Text>move</Text>
</TouchableHighlight>
</View>
);
但是它有错误“undefined is not an object (evaluating '_this.props.navigator')
”。
我怎样才能让它发挥作用?
我post编辑这个post时使用了react-native的导航器。我在这里通过使用 react-native-router-flux 解决了这个问题。 https://github.com/aksonov/react-native-router-flux
我在自定义抽屉中使用了 Actions.name(params),它有效!