简体   繁体   中英

How to initialize mesibo console in reactjs. for web app and not android apps. In reactJS not in Reactnative

How can I initialize mesibo connection in my reactjs web app with django backend.
I dont find any resources of doing that. even though i have included
<script type="text/javascript" src="https://api.mesibo.com/mesibo.js"></script>
in index.html and its loading in browser as well but having initialized the

initializeApiConn = () => {
  this.setState({
    api: new Mesibo()
  })
}

its not recognizing Mesibo()
can i have any resources and any links to understand this connection of mesibo with reactjs.

---------------------------------
EDIT:

  • I have included mesibo js in <head>

If you are including mesibo js your index.html, you may need to use window.Mesibo() in ReactJS

Alternatively, use DOM method to load mesibo.

const script = document.createElement("script");
script.src = "https://api.mesibo.com/mesibo.js";
document.body.appendChild(script);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM