Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

React.JS and AEM


Level 5

Our frontend dev team has decided they want to use React.js on our a project. I'm trying to figure out how we can sensibly use AEM and React in perfect harmony... 

What works quite well is having AEM render out components as script tags containing JSON. The single page app frontend makes an AJAX call to the publisher for a certain AEM page and can then parse the script tags extracting the JSON and then instantiating the React.js views using this data, they then render out the HTML. 

My problem is that this wont work on the author because the content team wont actually see any content as it is only rendering JSON. I planned on adding each react.js view as a clientlib and then somehow instantiate them based off the page content but was wondering before I head off down this path, has anybody worked with React and AEM before and what approach did you take?

1 Reply


Level 2

Ben Westrate presented a solution with a couple of frameworks that Olson has worked on.

CIRCUIT 2015 - React by Ben Westrate