map循环,报警告Expected to return a value in arrow function 意思是缺少return返回值 React 实战 | react map循环,报警告Expected to return a value in arrow function 解决方案: 使用forEach代替map,因为ESlint报这个警告是因为map, filter , reduce 需要返回值 也可以使用map,在react中用jsx的方式,直接把{}改成()