React writes Xiongpang account and wants to share the title and picture set by himself.

when react writes bear paw number, it needs to write the created script to the document asynchronously and dynamically, but there will be a warning, which causes me to share without changing the title of sharing, etc. How can I solve the problem (the annotated part is another method I wrote, but none of it is executed)

this line is my warning
Failed to execute "write" on" Document": It isn"t possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened

Let"s try the code I wrote
componentDidMount () {

    let url = encodeURIComponent(location.href.split("-sharp")[0]);
    console.log(url)
    const params = { url: url }
    getjsssdk(params).then((res) => {
        console.log(res)
        if (res.data.code === 100) {
            // var hm = document.createElement("script");
            // hm.src = "https://xiongzhang.baidu.com/sdk/c.js?" + res.data.data;
            // var s = document.getElementsByTagName("script")[0];
            // s.parentNode.insertBefore(hm, s);

            this.script = document.createElement("script");
            this.script.type = "text/javascript";
            this.script.src = "https://xiongzhang.baidu.com/sdk/c.js?" + res.data.data;
            // document.body.appendChild(this.script);
            document.getElementsByTagName("body")[0].appendChild(this.script);
            window.cambrian.share({
                data: {
                    title: "",
                    content: "",
                },
                // 
                success: function (data) {
                },
                // 
                fail: function (data) {
                }
            });
        }
    }).catch((error) => {

    });
}
Mar.26,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e41ca2-42f12.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e41ca2-42f12.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?