React Isomorphic ScriptLoader
React package to load scripts into your isomorphic (server side rendered) webapp.
Installation
npm install --save react-isomorphic-scriptloader
Example Usage
Component state = scriptsLoaded: false ; { return <div> <Loader src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places" onLoad= this /> thisstatescriptsLoaded && <div>Yayy google maps loaded</div> !thisstatescriptsLoaded && <div>Please wait while google maps is being loaded</div> </div> }
License
This package is licensed under the terms of MIT License. See the LICENSE file for further information.