Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/456.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 反应本机堆栈导航_Javascript_Android_Reactjs_Native - Fatal编程技术网

Javascript 反应本机堆栈导航

Javascript 反应本机堆栈导航,javascript,android,reactjs,native,Javascript,Android,Reactjs,Native,我有ComponentOne,它是ComponentTwo的父级。 然后我有组件三和组件四。 问题是我可以轻松地在ComponentOne到ComponentThree和ComponentFour之间导航,但我无法从ComponentTwo中的按钮导航,该按钮是ComponentOne的子项,我在React Native中使用堆栈导航, 错误:评估(this.props.navigator)未定义不是对象 我曾尝试在ComponentTwo的不同位置声明const{navigator},但似乎没

我有ComponentOne,它是ComponentTwo的父级。 然后我有组件三和组件四。 问题是我可以轻松地在ComponentOne到ComponentThree和ComponentFour之间导航,但我无法从ComponentTwo中的按钮导航,该按钮是ComponentOne的子项,我在React Native中使用堆栈导航, 错误:评估(this.props.navigator)未定义不是对象

我曾尝试在ComponentTwo的不同位置声明const{navigator},但似乎没有任何效果
非常感谢您的帮助。:)

我运气不错,刚通过考试 作为ComponetTwo的道具,它现在可以工作了:) 我认为我们需要将导航引用作为道具传递给子组件,以便从子组件访问它。
谢谢,

没有任何代码很难帮助您