Check out example codes for "append scripts using jquery". It will help you in understanding the concepts better.

Code Example 1

var s = document.createElement("script");
s.type = "text/javascript";
s.src = "http://somedomain.com/somescript";
$("head").append(s);

Learn ReactJs, React Native from akashmittal.com