繁体   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