How to use React app inside Perspective in Bloomreach?

347 Views Asked by At

We are using Bloomreach Experience (Hippo CMS) in our development and need to integrate exsiting react app into Perspective inside CMS panel. Is there any way to do this, exclude using iFrame?

3

There are 3 best solutions below

0
Jeroen Hoffman On BEST ANSWER

To integrate the React app in the CMS channel manager, the app should use the React SDK to render some specific comments HTML elements meant for previewing and editing capabilities.

Next, a proxy should be installed so the channel manager requests a app/channel on the same host, which is proxied to where is actually lives.

Please start at https://documentation.bloomreach.com/library/concepts/spa-integration/introduction.html

HTH Jeroen

1
Aditya On

React app can be easily integrated into other apps. You need to add a container element inside your existing DOM for react app to render. Then load the built React app using the script tag

0
Nikita Iskorkin On

So, here is a solution: We should add "homepage": "./." to package.json. Then, important thing that you shouldn't do is using BrowserRouter. Use instead HashRouter. Build your app and use this files in Perspective like other HTML, CSS and JS files.