react native props上存在的属性,显示不存在

问题:类型“Readonly<{}> & Readonly<{ children?: ReactNode; }>”上不存在属性“navigation”。ts(2339)
解决方法:
export default class Brand extends React.Component<any, BrandState>
把props传递为any就行了
 
 

猜你喜欢

转载自www.cnblogs.com/windseek/p/11134345.html