反应本机路由器流量不通过道具

时间:2018-10-08 10:33:04

标签: react-native react-native-router-flux

Environment:
"react-native": "0.57.1",
"react-native-router-flux": "^4.0.5",

通过Actionskey将道具从一个屏幕传递到另一个屏幕时,出现一个错误,提示我调用的道具未定义

我对这个问题进行了很多搜索,但一无所获

Screen1:

<View>
  <Button 
    title="click me"
    onPress={() => Actions.Screen2({id:5})} 
  />
</View>

Screen2:

<View>
  <Text>
    {this.props.id}
  </Text>
</View>

1 个答案:

答案 0 :(得分:0)

react-native-router-flux在最近的React本机版本中有很多问题,建议您使用react-navigation作为您的路由方法。

相关问题