blueberryapps / react-load-script

React component that makes it easy to load 3rd party scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question on using Script to load api key

fufjvnvnf opened this issue · comments

For example, can I do something like this:

<Script>
  url="http://api.map.baidu.com/api?v=2.0&ak=FUmG8hLpACVnEatoLyLNGSIG4SY6VAIM"
  onCreate={this.handleScriptCreate.bind(this)}
  onError={this.handleScriptError.bind(this)}
  onLoad={this.handleScriptLoad.bind(this)}
</Script>

@fufjvnvnf Yes, absolutely :)