[英]Setting up React Native and Flow - Getting Native Base errors
[英]Getting React Native errors with Flow
我设置Flow和React Native创建了它的默认.flowcongif文件。 但是“npm run flow”会返回大量有关本机库的错误:
node_modules/react-native/Libraries/Components/DatePicker/DatePickerIOS.ios.js:38
38: const DatePickerIOS = React.createClass({
^ call of method `createClass`. Expected a React PropType instead of
371: hitSlop: EdgeInsetsPropType,
^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Components/View/View.js:371
node_modules/react-native/Libraries/Components/DatePicker/DatePickerIOS.ios.js:105
105: this.props.onChange && this.props.onChange(event);
^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `onChange`. Function cannot be called on
105: this.props.onChange && this.props.onChange(event);
^^^^^^^^^^^^^^^^^^^^^^^^^^ property `onChange` of unknown type
您使用的是正确版本的Flow吗?
检查.flowconfig
文件底部的版本,确保是您安装的版本。
现在那将是:
npm --save-dev install flow-bin@0.42.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.