Is there any way to mix HTL and SPA components in a page (SPA or non SPA template)? Chris Millar at adaptTo conference 2018 said that it is not possible yet. Is there way now? Any Ideas? Thanks.
Topics help categorize Community content and increase your ability to discover relevant content.
See the reply from @Nikhil-Kumar
If you want to create any component using SPA template then it's not possible.
But you can have your own template created and and create HTL component in the same project structure.
NOTE: You can not use non SPA component in SPA template. As in SPA everything is client-side rendered.
If you see the body.html we only have root div to render at react side.
You can check out my article on the same, soon I will be coming up with one article in which I will list down the issues that I faced during my AEM+SPA project experience.
Thanks for quick reply. My case is like 2 custom components on page
Idea is like the components that are always on top of page will develop using HTL and components which are always used down the page will develop using React.
@Anudeep_Garnepudi - As far as I know it's not possible to mix a Non SPA and SPA component in SPA page.
But you can try adding adding some text or something at the page template level (Which will be hardcoded not a draggable component), But this will be effective across the template.