大佬教程收集整理的这篇文章主要介绍了React Native Functional Components - undefined 不是对象(评估“navigation.navigate”),大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在练习在 React Native 中从类组件迁移到功能组件,但我无法理解如何从组件访问导航。通常我会运行类似 <!-- ITEMS (BolLEN) VAN GESELECTEERDE AREA -->
<ion-row scrollX="true" class="scroll-items">
<ion-col size="3" *ngFor="let item of SELEctedArea.Items">
<!-- Items -->
<ion-button class="item-fab" (click)="SELEctItem(item)">
<ion-label class="ion-text-wrap">{{
item.Descriptions[0].Description
}}</ion-label>
</ion-button>
<ion-button>Test</ion-button>
<ion-button>Test</ion-button>
<ion-button>Test</ion-button>
<ion-button>Test</ion-button>
<ion-button>Test</ion-button>
<ion-button>Test</ion-button>
</ion-col>
</ion-row>
<!-- EINDE ITEMS -->
的东西。现在我通常将 .scroll-items {
justify-content: center;
align-items: ;
flex-wrap: nowrap;
overflow-x: scroll !important;
overflow-y: hIDden;
}
作为道具传递。
但在以下示例中似乎不起作用。我哪里错了?我正在使用反应导航:
this.props.navigation.navigate('screen')
我在 App.Js 中创建了一个堆栈导航器
navigation
尝试使用钩子,像这样:
$ brownie console
Brownie v1.14.6 - Python development framework for Ethereum
MyProject is the active project.
Launching 'ganache-cli --accounts 10 --hardfork istanbul --gasLimit 12000000 --mnemonic hill --port 8545 --time 1980-01-01 00:00:00+00:00'...
Brownie environment is ready.
>>> from datetiR_873_11845@e import datetiR_873_11845@e
>>> datetiR_873_11845@e.fromtimestamp(chain.time())
datetiR_873_11845@e.datetiR_873_11845@e(2021,5,15,17,28,37) # Should be (1980,1,0)
>>>
以上是大佬教程为你收集整理的React Native Functional Components - undefined 不是对象(评估“navigation.navigate”)全部内容,希望文章能够帮你解决React Native Functional Components - undefined 不是对象(评估“navigation.navigate”)所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。