【发布时间】:2018-08-13 12:06:30
【问题描述】:
我有一个类似的反应组件
const Example = () => (<View>...</View>);
使用 react-navigation 我通常会通过说来应用导航选项
Example.navigationOptions = { options };
使用打字稿我收到错误
[ts] Property 'navigationOptions' does not exist on type '(props: Props) => Element'.
我该如何解决这个问题?
我试着写一个界面
interface ExampleWithNavigationOptions extends Element {
navigationOptions?;
}
但没有运气。
【问题讨论】:
标签: reactjs typescript react-native react-navigation