我想在我onPress
的任何项目上打开另一个屏幕。如何从反应原生列表视图项目打开其他屏幕项目
<TouchableHighlight underlayColor={AppColors.black}
onPress={Actions.SubCategoryList(item.guid)}>
<View>
<Item style={{flexDirection: 'row', height: 50, borderBottomWidth: borderWidth}}>
<Text style={{
fontFamily: AppStyles.fontFamily,
fontSize: 17,
flex: 5,
color: AppColors.black
}}>{item.category_name}</Text>
<Item style={{flex: 1, borderBottomWidth: 0, flexDirection: 'row', justifyContent: 'flex-end'}}>
<Text style={{
color: AppColors.grey,
fontFamily: AppStyles.fontFamily,
fontSize: 17,
marginRight: 15
}}>{item.active_tournaments}</Text>
<Image resizeMode="contain" source={require('../../assets/images/right.png')}
style={{width: 15, height: 15, marginTop: 3}}/>
</Item>
</Item>
</View>
</TouchableHighlight>
但是,无论何时我在当前屏幕上,它都会直接进入子类别屏幕而无需点击。
我想知道如何捕获从另一个屏幕上的当前屏幕发送的数据。
使用箭头功能onPress = {()=> {Actions.SubCategoryList(item.guid)}} –
我已经尝试过,但是当我把任何事情都不是发生。 –