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

SPA react component is not rendering new code (seems stuck)

alexander94
Level 1
Level 1

Hi, I've followed a tutorial for setting up a react spa component and it's running and fetching the dialog.

However, now when i add additional classes (className) to the div it doesn't show up in the rendered html.

I see no errors in the error.log file under crx-quickstart and I get no errors in the browser. And the deploy says success.

I can see in the resource folder in ui.apps that my class is added.

 

I've also tried to recompile clientlibs...no change.

 

I've not been able to get npm start to work out, it sends me to http://localhost:3000/etc.clientlibs/spalab/clientlibs/clientlib-react/resources so i might have configured something wrong?

 

Have any of you used react? How do i debug this?

 

Thank you for any suggestions!

Adobe Experience Manager AEM AEM 6.4.8 react React JS SPA SPA Editor
6 Replies
prashantonkar
Level 4
Level 4
Where are you adding additional classes ?
alexander94
Level 1
Level 1
I added the classes to the div that I wanted to render from react, but I did a reinstall of my aem and now it works as it should. But I still can't get npm start to work out, it keep sending me to the empty page http://localhost:3000/etc.clientlibs/spalab/clientlibs/clientlib-react/resources .
prashantonkar
Level 4
Level 4
Have you checked .env.development file? REACT_APP_ROOT should point to your home page.
alexander94
Level 1
Level 1
Thanks, now it point me to the right page. However it is still empty
prashantonkar
Level 4
Level 4
THere might be some errors in console or error.log files. Also please check if model.json call is returning content from AEM.
alexander94
Level 1
Level 1
There was proxy issues on my end that caused it to fail and not render anything, but now it works. Thanks!