typescript - 当我像参数一样使用它时,类型路由是什么?
问题描述
我使用如下路线:
<Stack.Screen
component={VacancyChat}
name='VacancyChat'
options={({ route }: any) => ({
title: route?.params?.order.title,
})}
/>
我应该在这里使用什么类型的路线而不是任何路线?
解决方案
这是 Stack.Screen 的类型option
:
options?: ScreenOptions | ((props: {
route: RouteProp<ParamList, RouteName>;
navigation: any;
}) => ScreenOptions);
推荐阅读
- javascript - 加载脚本和清单违反了内容安全策略指令
- java - 运行本机查询时发生 ConverterNotFoundException
- android - 如何确定 GMail 用于传递我的应用程序接收到的文件的 MimeType?
- php - 基本 Stripe 集成无法加载支付页面
- javascript - 如何在 Mongoose 中使用 findByIdAndUpdate 填充数组
- go - 带舵的尺码表
- ckeditor - TYPO3 9.5.4 CKEditor RTE 删除样式属性
- php - Get_where() 带有用户定义的子句
- ios - 如何使clang仅在发布时编译文件?
- javascript - 防止为两个字段输入相同的值 angular 6