react-meta-tags
react-meta-tags copied to clipboard
Script tag JSON-LD render twice!
I have included the <MetaTags> in my JSX. Why does my script tag render twice?
the first script tag returns undifined values, and the second one returns the correct values, i have added async & defer to my script tag but in vain!!
<MetaTags>
<script type="application/ld+json">
{`
{
"@context": "https://schema.org/",
"@type": "CreativeWorkSeries",
"name": "${this.state.name}",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "${this.state.rating}",
"bestRating": "5",
"ratingCount": "${this.state.count}"
}
}
`}
</script>
</MetaTags>
I opened a PR to fix this: https://github.com/s-yadav/react-meta-tags/pull/35