React js - Bot renders multiple times in DOM
# 🤝help
Hi guys, long time member of the server, finally decided to bite the bullet and create my own bot. I'm currently having an issue where I can see in the DOM that the bot renders multiple times, leading also to GUI issues (visible in screenshot - minimization doesn't look as it should). I'm cleaning up the useEffect by unmounting the script but it seems that it doesn't help and I can't seem to find any similar issues anywhere. Below the Chatbot code, any help is much appreciated!
Copy code
import React, { useEffect } from "react";

export const Chatbot = () => {

  useEffect(() => {
    const script = document.createElement("script");
    script.src = "";
    script.async = true;

    script.onload = () => {
        composerPlaceholder: "Need a hand?",
        botConversationDescription: "Book manager lends a hand",
        botId: "c66de7a3-.........-734c6b823463",
        botName: "Martha",
        hostUrl: "",
        messagingUrl: "",
        clientId: "c66de7a3-.........-734c6b823463",
        webhookId: "340cb504-........-274567397fbe",

    return () => {
  }, []);

  return <div id="webchat" />;