【发布时间】:2020-11-08 21:58:50
【问题描述】:
我确实对 stackoverflow 进行了研究,并收到了一些结果,但仍然无法帮助我正确解决这个不同的问题。 (函数和类的区别)
(期望一个赋值或函数调用,而是看到一个表达式 no-unused-expressions。)
在 我是这个主题的新手。如果有人可以帮助我,我真的很感激^_^。非常感谢。function App() {
var products7 = [
{
name: 'Hollow Knight',
id : 1,
price: '3$',
status : true,
image: 'https://yuzu-emu.org/images/game/boxart/hollow-knight.png'
},
{
name: '60 Second!',
id : 2,
price: '4$',
status : true
image: 'https://yuzu-emu.org/images/game/boxart/hollow-knight.png'
},
{
name: 'Valiant Heart',
id : 3,
price: '5$',
status : true
image: 'https://yuzu-emu.org/images/game/boxart/hollow-knight.png'
},
];
let elements = products7.map((Product7, index) => {
return
<Product7 key= {products7.id}
image={products7.image}
price={products7.price} >
{products7.name}
</Product7>
});
【问题讨论】:
-
JSX 你在一组 ( ) 中返回