预期分配或函数调用,而是看到一个表达式no-unused-expressions反应js

时间:2019-01-09 04:52:07

标签: reactjs redux react-redux

以下是我的JSON响应格式。

              data:[             
                    {status: "ACTIVE", zipcode: "500019", country: "India", city: "Hyderabad"}

                     {status: "ACTIVE", zipcode: "500026", country: "India", city: "Hyderabad"}

                    {status: "ACTIVE", zipcode: "500028", country: "India", city: "Hyderabad"}
                        ]

我尝试了以下代码,但徒劳无功,我没有找到预期的结果。 我收到以下错误 应该进行赋值或函数调用,而是看到一个表达式no-unused-expressions

         {this.props.bkList && this.props.bkList['data'] && this.props.bkList['data'].map(row=>{                                  

                                return(

                                    <TableRow key={row.bankId}
                                    hover
                                    onClick={() => this.handleViewDetail(row.bankId)}
                                    >
                                    {Object.keys(row).forEach(function (key){
                                        console.log(row[key]);
                                        <TableCell>{row[key]}</TableCell>

                                    })}


                                        <TableCell>
                                            <Button variant="contained" className={classes.button} onClick={(e)=>this.handleViewBranches(row.bankCode,e)}>
                                                View
                                            </Button>
                                        </TableCell>
                                    </TableRow>
                                 )

                            })}                            
                        </TableBody>

有人可以让我知道我要去哪里错吗?

0 个答案:

没有答案