【发布时间】:2020-03-09 09:55:30
【问题描述】:
有没有人尝试在 React 项目中实现这一点? github/npm 网站上的文档内容不多。当我尝试注入数据时,是否有特定的方法可以添加 graphql 数据?
JSX:
<JSONLD>
<Generic jsonldtype="event" schema={{
name: "${adv_event.title}",
description: "${adv_event.body}",
startDate: "YYYY-MM-DDT:HH:MM",
endDate: "YYYY-MM-DDT:HH:MM",
image: "",
}}>
<Generic type="location" jsonldtype="Place" schema={{ name: "test", }}/>
</Generic>
</JSONLD>
我尝试过的:
name: "${adv_event.title}",
name: "`${adv_event.title}`",
name: {adv_event.title},
【问题讨论】: