【发布时间】:2020-10-19 23:05:57
【问题描述】:
我有一个 data.js 文件,其中有:
**export default [
{
id: 1,
title: "Black shirt Friday outfit",
price: 30.99,
image:URL("../images/black-shirt.jpg")
},
{
id:2,
title:"Look at me in brown boots",
price:25.30,
// image: (url("../images/brown-outfit.jpg"))
},
{
id:3,
title:"Cute winter",
price: 21.90,
// image: url("../images/cozy-outfit.jpg"),
},**
我的问题是:我可以使用什么语法在我的 react-app 中渲染这些图像?
【问题讨论】:
标签: reactjs