Expand my Community achievements bar.

SOLVED

use SPA react components and non SPA components inside the same page

Avatar

Level 2

I'm using the SPA maven archetype and i need to create a page with the ability to use both ootb or custom non spa components with react components.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@gab_221  Yes technically it's feasible in same archetype or project ypu can include both spa based template (pages) and non spa based template(pages) it works i had tested out. But architecture wise i dont recommend it because we are not utilizing the SPA feature in this case.I mean SPA architecture is to render child pages json data and cache upfront so that its gets a native app like benefit but in this case you switch back and forth between MAP and SPA you will loose those benefits.

 

Regards,

Raja

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @gab_221 

You cannot mix SPA components and Non SPA components in same page. Please refer this thread for details

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/on-aem-6-5-can-we-build-a-...

 

Adobe provides React/Angular bases core components you can make use of them. In a page template it should be all SPA based or non spa based component you cannot mix both unfortunately.

 

Avatar

Level 2

Thanks @RajaShankar and is there a way to create a page type template (non react) in the same spa archetype so i can have both options?

Avatar

Correct answer by
Community Advisor

@gab_221  Yes technically it's feasible in same archetype or project ypu can include both spa based template (pages) and non spa based template(pages) it works i had tested out. But architecture wise i dont recommend it because we are not utilizing the SPA feature in this case.I mean SPA architecture is to render child pages json data and cache upfront so that its gets a native app like benefit but in this case you switch back and forth between MAP and SPA you will loose those benefits.

 

Regards,

Raja