aem-react | components based on React for server and client side | Content Management System library
kandi X-RAY | aem-react Summary
kandi X-RAY | aem-react Summary
AEM templates and components based on React for server and client side. Provides a demo content package and core osgi bundle.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Evaluates the given reader
- Wraps the rendered HTML in a Tea
- Renders a given react component
- Renders the react markup
- Get the edit dialog
- Include resource
- Parse an edit dialog node
- Finds cities
- Gets a resource
- Invokes the proxied method on the target object
- Checks if the given resource type is a react component
- Gets a connection to the repository
- Binds the dynamic class loader
- Returns a JsProxy for the given class
- Load JCR script
aem-react Key Features
aem-react Examples and Code Snippets
Community Discussions
Trending Discussions on aem-react
QUESTION
To briefly describe my goals --
- I have an external React component library of ~70 React components, which feeds a web frontend (Websphere Commerce site, which pulls in Experience Fragments via AJAX calls to get the fragment HTML), and also a React Native app. So for the web, AEM is basically the content engine which feeds our headless frontend.
- I'd like to use those same React components to feed the AEM Experience Fragment authoring experience, instead of having to rebuild each React component as an HTL template within AEM -- it's too much overhead to maintain a completely separate component library of HTL templates
- By following the official Adobe tutorial here, I see how it is possible to map React components to the Content Fragment authoring experience. By which I mean, if I go to AEM Home > Sites > (my site) > create a new fragment, the component I drag in is fed by a React template. I can tell, because the markup matches what is in my
BasicComponent.js
React template in ui.frontend, and not thebasic-component.html
template in ui.apps. - But, if I go to AEM Home > Experience Fragments > create a new fragment, that same
BasicComponent
component will pull from thebasic-component.html
file in the component folder (next to .content.xml), instead of fromBasicComponent.js
I'm new to AEM, so hopefully the above makes sense. I know I am missing something pretty fundamental re: how Experience Fragments differ from Content Fragments (if that is the right term). I've spent a lot of time Googling around for information, but I'm finding that my own ignorance is making it difficult for me to determine if what I'm reading is or is not a clue to solving my issue.
This is the repo that I pulled down to experiment with: https://github.com/drginm/aem-react-simple-example
Any help much appreciated! I'm sure I'm not the only AEM newbie looking for an approachable model for handling this situation.
...ANSWER
Answered 2020-Sep-18 at 18:15Experience Fragments is not recommended used with ajax html in headless architecture, it should be exposed via sling model exporter in json format for the react consumption.
To edit and modify the experience fragments AEM doesn't provide any APIs, AEM developer should give custom REST APIs to do the changes.
I would recommend to go with the content fragments where the CRUD operation is possible via Assets api in AEM.
References
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aem-react
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page