react-inline-script
Inject arbitrary javascript and inline <script>
tags into your DOM and React app without any hassles.
Usage
Component { superprops } { return <div id="some-content"> <Script></Script> </div> }
For multiline scripts, just wrap your contents in {` /* Your script */ `}
:
Component { superprops } { return <div id="some-content"> <Script> ` const test = true if (test) alert("howdy!") ` </Script> </div> }