【发布时间】:2020-01-23 19:09:42
【问题描述】:
在我的 react jsx 文件中,我在一个表中有以下代码
render() {
return(
<Table>
<thead>
<tr>
{
this.collection.arraylist.map((name) => {
return this.getMoreNames(name)
}
}
</tr>
</thead>
<Table>
)}
esLint is give me the error as described in my post subject. I read other post and added () but that did not work
this.collection.arraylist.map((name) => ({
return this.getMoreNames(name)
})
我尝试删除名称周围的括号,错误仍然存在。该代码有效,但我不确定如何解决此 lint 错误。
【问题讨论】: