在列表遍历中出现Array.prototype.map() expects a return value from arrow function的警告
原因:map()需要return一个值
解决办法:使用forEach代替。或者添加return,以下两种格式都可实现。
在列表遍历中出现Array.prototype.map() expects a return value from arrow function的警告
原因:map()需要return一个值
解决办法:使用forEach代替。或者添加return,以下两种格式都可实现。