If you have a {...} then it's going to start interpolating. And you are bound to have whenever you use if, function ... Workaround: you can wrap it inside of an interpolated string {'if (true) { ... }'}
If you have any ' or " it's going to output the html encoded version and Javascript is going to throw a parsing exception.
In order to workaround those two issues the best way I found is to use dangerouslySetInnerHTML and use ES6 backtick in order to have multi-line strings.
<script>
is a bit hard to use right now.{...}
then it's going to start interpolating. And you are bound to have whenever you useif
,function
... Workaround: you can wrap it inside of an interpolated string{'if (true) { ... }'}
'
or"
it's going to output the html encoded version and Javascript is going to throw a parsing exception.In order to workaround those two issues the best way I found is to use dangerouslySetInnerHTML and use ES6 backtick in order to have multi-line strings.
We should probably make it easier, it's quite a pain to use right now.