簡體   English   中英

如何在 reactjs 中初始化 mesibo 控制台。對於 web 應用程序而不是 android 應用程序。 在 reactJS 中不在 Reactnative 中

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

如何在我的 reactjs web 應用程序中使用 django 后端初始化 mesibo 連接。
我沒有找到這樣做的任何資源。 即使我已經包括
<script type="text/javascript" src="https://api.mesibo.com/mesibo.js"></script>
在 index.html 中,它也在瀏覽器中加載,但已經初始化了

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

它不識別Mesibo()
我能有任何資源和任何鏈接來了解 mesibo 與 reactjs 的這種聯系嗎?

----------------------------------
編輯:

  • 我在<head>中包含了 mesibo js

如果你包含 mesibo js 你的 index.html,你可能需要在 ReactJS 中使用 window.Mesibo()

或者,使用 DOM 方法加載 mesibo。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM