如何在点燃反应导航中传递道具?

时间:2017-04-13 09:00:22

标签: reactjs react-native react-navigation

我想将一个参数从一个组件传递给另一个组件,以下是我的代码。

this.props.navigation.navigate('Otp', {
            mobileNo: this.state.mobileNumber
        })

以下是我试图获取值的方法,我收到的是NULL。

console.log(this.props.navigation);

输出 enter image description here

当我尝试使用调试器时,我得到了它。

enter image description here

我正在尝试获取mobileNo变量。

0 个答案:

没有答案
相关问题