Skip to main content
Level 2
Sep 8, 2023 5:26 PM UTC

Using SPA editor without SPA Routing

We have a requirement where client has a React component library developed outside of AEM and they want to use it to create their new website in AEM. They don't want SPA features such as spa routing. We are thinking of using the React SPA project with Server Side Rendering using a express server. We will not use react routing as SPA is not a requirement for the client.  With this approach we can use all the react code already developed. 

 

Will this be a good approach? What issues can we face? Any suggestion will be helpful!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

8 replies

EstebanBustamante
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Sep 8, 2023 7:45 PM UTC

Hi, 

 

I think you could potentially explore the "integrated SPA" option from this article: https://www.albinsblog.com/2021/11/single-page-applicationspa-design-patterns-in-aem.html. Here you have several design patterns and options available when working with SPA.

Translate
Esteban Bustamante
ayushnAuthor
Level 2
Sep 9, 2023 6:59 AM UTC

Thanks for the response.

For us SPA is not a requirement. We want to use full react code and also use the WYSIWYG editor for content authoring.

 

 

Translate
Shashi_Mulugu
Community Advisor and User Group Leader
Community Advisor and User Group Leader
Sep 9, 2023 2:25 AM UTC

@ayushn adobe released new feature AEM remote Spa with next js last year.. it is just awesome.. here you will use either react ssr or react csr with next js app and use aem editor functionalities as-is for content management.

 

 

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/spa-editor/remote-spa/overview.html?lang=en

Translate
ayushnAuthor
Level 2
Sep 9, 2023 7:14 AM UTC

Thanks for the response!

We don't want to use remote Spa. We want WYSIWYG editing capability for authors.

 

Translate
Shashi_Mulugu
Community Advisor and User Group Leader
Community Advisor and User Group Leader
Sep 12, 2023 5:52 AM UTC

I understand your concerns and it's not mean to use spa as by name, it's a feature using which we can enable WYSIWYG editor, even I did multiple websites where site is normal multi page site but hosted using Remote SpA approach, if you are on AEM cloud or AMS and if client have adobe connections, explore options of AEM Universal Editor as well.

Translate
Community Advisor
Sep 11, 2023 8:36 PM UTC

Maybe you can explore this option.

  • Create a placeholder component in AEM with required dialogs - this component will only have a DIV, and the dialog data is added to the DIV as an attributes.
  • Create a wrapper component in AEM that uses the external component and renders through the data stored in the div attributes.

This will allow you to use the standard editable template and multipage websites, but the components are selected through the React component; you can even combine the non-React Component(HTL) with the React Component.

Regards

Albin

https://www.albinsblog.com

Albin Issac – Medium

 

Translate
Level 3
Sep 14, 2023 7:06 PM UTC

Do you have any working sample of this approach? 

How would SPA routing will take place here?

Translate
kautuk_sahni
Level 9
Sep 12, 2023 1:10 PM UTC

@ayushn Do you find the suggestions from users useful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. 

Translate
Kautuk Sahni