Hello everyone!
In my local, I'm utilizing a SPA react component. I received a request for a bring option to allow multiple components inside SPA react components like Tab and Accordion.
Thank you.
Solved! Go to Solution.
Views
Replies
Total Likes
You can include a component inside another component within SPA, but, that must be done through code.
As AEM already provides a parsys functionality for the same, we can achieve this relatively easily through AEM component.
Inside your AEM component's HTML(which would be importing the SPA component), just add a parsys and in the template policy only allow Tab & Accordion for it.
Also, if you need it to be dependent on a option which is controlled by authoring, just add a sly-test on the parsys rendering.
Hi @Kaibalya_123 ,
The answer is totally subjective to requirement.
Best way to manage this is to create atomic and composite components.
For instance,
Atomic components can be - image, form fields
Composite components - Image card (image + heading) by using atomic components.
Also refer this repo : https://github.com/adobe/aem-react-core-wcm-components-spa/blob/master/README.md
Hope this helps, thanks.
You can include a component inside another component within SPA, but, that must be done through code.
As AEM already provides a parsys functionality for the same, we can achieve this relatively easily through AEM component.
Inside your AEM component's HTML(which would be importing the SPA component), just add a parsys and in the template policy only allow Tab & Accordion for it.
Also, if you need it to be dependent on a option which is controlled by authoring, just add a sly-test on the parsys rendering.
Views
Likes
Replies