Open MeRahulAhire opened 4 years ago
Hi, You declare variable in the string and then you want to use it. It is the reason of this error (Unexpected token).
And this type of script is use for do seo (put jsonLd in it). You can put your code in the componentDidMont(lifecycle).
Hope this can help you!
@MeRahulAhire DId you found fix i am also facing same issue
Following is the snippet i am using
<script type="text/javascript"> {
xx.xx({
xx: "xx",
xx: "xx",
xx:"xx",
xx: "xx"
}).x();} </script>
getting this exception Uncaught SyntaxError: Invalid or unexpected token
Hi, can you please me how to write the script tag using
React-Helmet
in my react application?As per your npm docs, i should be using it in this way :
and when i tried to excute it in my project,
and it renders this error:
Whats the solution to it?
your help will be extremely valuable for me Thanks...