[英]Javascript Unexpected use of comma operator no-sequences warning
I have a react library which throw following warning.我有一个反应库,它会引发以下警告。
Unexpected use of comma operator no-sequences
It indicates the warning happens at 5 row, after (_react.Component) parameter.它表示警告发生在(_react.Component)参数之后的第 5 行。
exports.default = function (_ref) {
出口。默认= function(_ref){
return function () {
返回 function () {
var _class, _temp2; return _temp2 = _class = function () { }(_react.Component), _class?.displayName = 'Resizable()', _temp2;
};
}; }
}
I simplfied the method.我简化了方法。 It's actually very long function.
它实际上很长 function。
How can i fix the warning?我该如何解决警告? What is the proper syntax?
什么是正确的语法?
return a <div>
tag to the rendered component eg;将
<div>
标签返回给渲染的组件,例如;
const App=()=>{ return(<div>
<Header/> <Body/>
</div>
); const App=()=>{ return(<div>
<Header/> <Body/>
</div>
); } }
ReactDom.render(<App/>,document.getElementByid("root));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.