I’m working through this project and have run into an issue where the browser doesn’t update. It started when the animal images wouldn’t render to the page. After messing around and even watching the video to get unstuck I couldn’t figure out what I’ve done. I even removed the root.render(animalFacts) to see if it would clear the webpage but it continues to display the header and background. Have I done something wrong or is there a problem elsewhere? Any help is appreciated.
There may be other issues, but for a start:
In your img
elements, you are using :
to separate attributes from their values, whereas =
should be used.
// You wrote:
<img
key:{animal}
className:'animal'
...
// It should be:
<img
key = {animal}
className = 'animal'
...
1 Like
Thanks so much. I knew it had to be a simple solution like that but couldn’t see it. I also didn’t realize that a syntax error would break everything causing the DOM to not update. But now I do. Thanks again.
1 Like