简体   繁体   中英

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.

exports.default = function (_ref) {

return function () {

 var _class, _temp2; return _temp2 = _class = function () { }(_react.Component), _class?.displayName = 'Resizable()', _temp2;

}; }

I simplfied the method. It's actually very long function.

How can i fix the warning? What is the proper syntax?

return a <div> tag to the rendered component eg;

const App=()=>{ return(<div> <Header/> <Body/> </div> ); }

ReactDom.render(<App/>,document.getElementByid("root));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM