Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

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

Avatar

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!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6 Replies

Avatar

Level 4
Where are you adding additional classes ?

Avatar

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 .

Avatar

Level 4
Have you checked .env.development file? REACT_APP_ROOT should point to your home page.

Avatar

Level 1
Thanks, now it point me to the right page. However it is still empty

Avatar

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.

Avatar

Level 1
There was proxy issues on my end that caused it to fail and not render anything, but now it works. Thanks!