【发布时间】:2020-07-12 18:16:08
【问题描述】:
谁能解释我在这里做错了什么......
<Something
content={[
{
heading: "Add Company",
icon: "plus",
options: {[
{
image: "srcimage",
text: "New Company",
link: "test"
}, { //Errors here
image: "srcimage",
text: "Existing Company",
link: "test"
}
]}
}, {
heading: "Import Company",
icon: "download",
options: {[
{
image: "/src/image",
text: "Class",
link: "/test"
},
{
image: "/src/image",
text: "BGL",
link: "/test"
},
{
image: "/src/image",
text: "SuperMate",
link: "/test"
}
]}
}]
} />
我收到错误消息...Unexpected token, expected "]",上面写着error here。最终,我想根据这样传入的内容创建一些内容块......
谢谢
【问题讨论】:
标签: reactjs components react-props