I need something to run in a script tag, and I am using dangerouslySetInnetHTML
to do so. It seems to be working just fine on another app, but nothing is being called in this case. I'm not sure if I am doing this the wrong way or there is something else. This is what my code in the component's render function looks like:
render () {
return (
<div>
<div>
Other component things
</div>
<script type='text/javascript' dangerouslySetInnerHTML={{
__html: `console.warn('HELLOOOOO'); doSomething()`
}}></script>
</div>
)
}