SPA react component is not rendering new code (seems stuck) | Community
Skip to main content
November 6, 2020
Question

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

  • November 6, 2020
  • 6 replies
  • 2589 views

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!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

prashantonkar
Level 4
November 9, 2020
Where are you adding additional classes ?
November 10, 2020
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
November 10, 2020
Have you checked .env.development file? REACT_APP_ROOT should point to your home page.
November 10, 2020
Thanks, now it point me to the right page. However it is still empty
prashantonkar
Level 4
November 10, 2020
THere might be some errors in console or error.log files. Also please check if model.json call is returning content from AEM.
November 10, 2020
There was proxy issues on my end that caused it to fail and not render anything, but now it works. Thanks!