How can I create a app that can be embeddable and use it as script in a React application?

239 Views Asked by At

I need to embed my own chatbot built using React in other React apps using <script>. Can anyone tell me where to start?

I need to do like this:

<script>
  window.chatbaseConfig = {
    chatbotId: "9hA3--GLvK_7q1DRscuH3",
  }
</script>
<script
  src="https://www.chatbase.co/embed.min.js"
  id="9hA3--GLvK_7q1DRscuH3"
  defer>
</script>
1

There are 1 best solutions below

2
fpers On

Have you tried using the <iframe> html tag? The iframe tag is used to embed another document within the current HTML document. Here is more information W3Schools iframe