Integrating my React chatbot into WordPress website

[ad_1]

I thought this would be easier, but I’m having issues doing this.

We’ve build a new website for our client, we use WordPress with Bedrock/Sage (basically no plugins, we code everything so there’s full control there).

I build a chatbot in React, using Node as a backend. Initially thought I could get away inserting it as an iFrame but this is causing me to use more hacks to get it to work properly than I’d like to. The chatbot goes fullscreen and there’s a minimize button etc. Doesn’t go well.

I’ve been trying to inject the build files into JavaScript for 2 hours now. Initially I dropped them into the project and tried it like that, didn’t work. We are hosting the chatbot on a seperate domain, so then I tried to inject these files but nothing seems to happen. No console.log errors either, the div with id=”root” just stays empty.

Does anyone have experience with this?

[ad_2]
3 Comments
  1. You need to share the code that you used to do this. I don’t know much about how react works but my understanding is it’s just JavaScript so I can’t imagine why there would be any issue preventing you from integrating it into a page.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer