How to load script in react component
问题 I am having following script file <script language="javascript"> document.write('<script language="javascript" src="http://tickettransaction.com/?bid='+bid+'&sitenumber='+site+'&tid=event_dropdown" ></' + 'script>'); </script> I follow this Adding script tag to React/JSX but it does not work for me... How do I load the script in my react component? 回答1: After a lots of R&D finally I found my solution. I have used npm postscribe to load script in react component postscribe('#mydiv', '<script