我在react上做了一些关于设置脚本的研究,比如下面这个例子:
componentDidMount () {
const script = document.createElement("script");
script.src = "https://www.example.com/example.js";
script.async = true;
document.body.appendChild(script);
}
我需要在其中设置data-client-key
,但react似乎无法对其进行编译。有人能帮我吗?
https://stackoverflow.com/questions/55243964
复制相似问题