我正在尝试运行react-native-web,我在浏览器控制台中收到以下错误:
TypeError: ( is not a function. (In '(0, _NativeMethodsMixin.NativeMethodsDecorator)', '(' is undefined)
它停止了这个babel生成的代码:
var ListView = (0, _NativeMethodsMixin.NativeMethodsDecorator)(_class = (_temp = _class2 = function (_Component) {
_inherits(ListView, _Component);
function ListView(props) {
_classCallCheck(this, ListView);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ListView).call(this, props));
_this.state = {
curRenderedRowsCount: _this.props.initialListSize,
highlightedRow: {}
};
_this.onRowHighlighted = function (sectionId, rowId) {
return _this._onRowHighlighted(sectionId, rowId);
};
return _this;
}
我错过了某种类型的babel插件吗?
更新
这里是提到NativeMethodsDecorator
的src代码:
import { NativeMethodsDecorator } from '../../modules/NativeMethodsMixin'
...
@NativeMethodsDecorator
export default class ListView extends Component {...