/react-headinjectscript

a component react that inject script tag on head tag

Primary LanguageJavaScriptMIT LicenseMIT

HeadInjectScript

a component react that inject script tag on head tag

Build Status

Usage

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
 />

Test

npm test

Run Demo

cd demo

npm install

Run demo

npm start

Alt Text