2017-09-04 78 views
0

我有ComponentOne,它是ComponentTwo的父項。 然後我有ComponentThree和ComponentFour。 問題是我可以很容易地在ComponetOne之間導航到ComponentThree和ComponentFour,但我無法從ComponentTwo中的一個按鈕導航,這是ComponentOne的一個子項,我在React Native中使用堆棧導航, 錯誤:評估(this.props。導航)未定義不是對象React Native Stack Navigation

我曾嘗試在ComponentTwo中的各個位置聲明const {navigator},但似乎沒有任何幫助 幫助將受到高度讚賞。 :)

+0

沒有任何代碼,它很難幫助 – bennygenel

回答

0

我有運氣,剛剛通過了 作爲道具ComponetTwo,現在工程:) 我認爲,我們需要通過導航引用作爲道具子組件從子組件訪問它。 謝謝,

相關問題