JavaScript React Basics (retired) First Steps in React Our First Application

nico dev
nico dev
20,360 Points

Everything works as it should, except the DOM doesn't seem to receive the updates from the JSX file.

Hello community,

I apparently made everything work (well, I thought! :) ) until I made the changes to the JSX file, adding the Application component, and changing the <h1> tag that said 'Hello!' with the Application instead.

Since I did that, no matter how many times I refresh, or what do I change in the JSX file, no update or change gets reflected in the browser. I still get the same page with the <h1>Hello</h1>. Nothing else. I tried changing the text in the h1, changing it for the <Application />, and tried with another element. No success, still the same.

I am using the files provided for download and the http-server of node for my local environment.

It could perfectly be something dumb I'm making |o|, but I honestly I cannot identify it. I thought it also could be related to Babel, but then, how did it transpile the first time? Doesn't make sense to me.

Sorry, but this time I am really clueless...

Thank you in advance for any insight, suggestion, correction, feedback, advice, etc.! Very much appreciated.

nico dev
nico dev
20,360 Points

Spot on! Thank you so much, Jennifer Nordell!

Among all the things I thought could be giving trouble, that didn't happen to occur to me. I don't know the reason, but every time I do a change in the JSX file (doesn't matter how little), the browser will not load them if I don't delete chached images and files.

Now, if it would be possible, please put your comment as an answer, so I can say this was solved and yours was the best answer (I learned that from someone(?)) :)

NOTE: By the way, is there a way to avoid this endless, repetitive caching thing from the browsers? I was trying with the http-equiv, that supposedly should control the HTTP headers, I think? But it doesn't change anything.

Thank you so much again!

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

HI Nico Trivelli! I changed my comment to an answer per request :smiley: As for how you can avoid this, you could turn off caching in your browsers, but this is not something I'd really recommend. Instead, I think your best bet is to launch the site in a private browsing tab which doesn't cache anything :sparkles:

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Out of curiosity, have you tried clearing the browser cache or launching it in a private browsing tab? It could be that it's loading in an older version of the site.