Hi everyone,
I am trying to integrate react in AEM project wihtout spa-editor. I have gone through this following community posts -
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-integrate-react-int...
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-integration-with-react...
I have tried to use react-abode npm package but got build failure. Haven't tried react-habitat package though, it seems way too old (last commit was 8 years ago). Also it doesn't support functional react component.
Can anyone share a working repo of non SPA React implementaion?
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi Julkar,
Use ui.frontend for React Integration:
Embed React Components Dynamically:
import React from 'react'; import ReactDOM from 'react-dom'; import MyComponent from './MyComponent'; ReactDOM.render(<MyComponent />, document.getElementById('my-react-div'));
Follow AEM Headless Guidance:
Handling State and Data Sharing:
Hi @ManviSharma ,
I am trying to integrate react with existing code base, cant use SPA editor or headless approach. My goal is to use react in HTL. I will pass model data as json through data-attribute or something, then react handles the rest. Your shared snippet is exactly what I have in mind, I have tried this approach with webpack bundler but getting build failure for ui.frontend module.
Could you please share a working example?
Views
Replies
Total Likes