Skip to main content
Level 2
October 21, 2022
Solved

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

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
RajaShankar
RajaShankarAccepted solution
Community Advisor
October 21, 2022

@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

3 replies

RajaShankar
Community Advisor
Community Advisor
October 21, 2022

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-website-with-react-core-and-custom/m-p/359598

 

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.

 

Translate
gab_221Author
Level 2
October 21, 2022

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?

Translate
RajaShankar
Community Advisor
RajaShankarCommunity AdvisorAccepted solution
Community Advisor
October 21, 2022

@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

Translate