在前端代码上传仓库的过程中,eslint报错: react map循环一直报Expected to return a value in arrow function array-callback-return警告,提示内容的意思是没有return一个值 解决方法: 1:用Object.keys(this.props.ntn).forEach去替换.map,因为ESLint array-callback-return这个警告是因为在使用map, filter , reduce 没有去返回一个值。 2:当然也可以使用map,在react中用jsx的方式,直接把{}改成()即可。 3:具体参考:https://stackoverflow.com/questions/43685424/expected-to-return-a-value-at-the-end-of-this-function-array-callback-return-in