我刚刚开始使用react,我正在尝试使用web sdk。使用客户端代码,该库非常容易使用:将其脚本添加到页眉,当文档准备就绪时,它将为您提供一个具有属性、方法和事件的对象。我的目标是访问react中的对象方法和属性。这有可能吗?在下面的代码中,AddScript
将在客户端创建一个名为Stuff
的对象,使用浏览器开发工具,我可以确认该对象存在并且不为空。如何在React中使用人员?
export class MyStuff extends Component {
constructor(props) {
super(props);
this.state = {
};
}
async componentDidMount() {
try {
await AddScript();
...
转载请注明出处:http://www.xiangbinbaiyi.com/article/20230507/1184538.html