a component react that inject script tag on head tag
npm install react-headinjectscript
<HeadInjectScript
injectBeforeEvent={callback_before_event} //first event with no parameter
injectsource={callback_get_string_src} // when retrieve source script whith no parameter
injectDoneEvent={callback_done_event} // when append to head tag no parameter
injectOnLoadScriptEvent={callback_load_event} // when load after injectDoneEvent whith url parameter
/>
npm test
cd demo
npm install
Run demo
npm start