Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Using General (HTL) Components in an AEM SPA (React)

Avatar

Avatar
Validate 1
Level 1
marcjermaine
Level 1

Likes

3 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
marcjermaine
Level 1

Likes

3 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 3
Boost 1
Applaud 5
View profile
marcjermaine
Level 1

24-08-2020

Hello everyone!

I would like to ask if it is possible to use an HTL component with an AEM SPA project. Let's say I wanted to use the Title HTL component, is there a way to do this? Thank you!

marcjermaine_1-1598282411794.png

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

251 likes

Total Posts

262 posts

Correct Reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

251 likes

Total Posts

262 posts

Correct Reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile
Nikhil-Kumar
MVP

24-08-2020

@marcjermaine -
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,
Nikhil

Answers (0)