React SPA Core Components hyperlinks not working with SSR
We are doing a POC to enable Server Side Rendering in a AEM React SPA project. We used the following command to create the project.
mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=36 -D aemVersion="6.5.17" -D appTitle="AEM React SSR Sample" -D appId="aem-sites-react-spa-ssr" -D groupId="apps.experienceaem.sites" -D frontendModule=react -D includeExamples=n -D includeDispatcherConfig=n -D enableSSR=y
The project was created successfully and the SSR is working with the Express server running. The issue we are facing is that the hyperlinks are not working for any of the out of the box React core components.
For example when we add a button to the page and provide a link to a page in the same project or even any other page the hyperlink is not working. When we inspect the element we can see that the link we put is not getting populated in the href attribute of the tag.
We created a custom component with a hyperlink field and that is working as expected. Only in the React core components provided by Adobe we are facing this issue. We also didn't face issue in any of the SPA projects without SSR.
We also tried with the archetype version as 41 and got the same issue. Any advice on how we can fix this would be helpful. Thank you!