React project does not render

Hi All :slight_smile: I am on the following step of the frontend-path:

https://www.codecademy.com/paths/front-end-engineer-career-path/tracks/fecp-22-react-part-i/modules/wdcp-22-jsx/projects/js-react-animal-fun-facts

The project fails in step 4. No feedback is given by the debugger or compiler.
I tried resetting the project with this code:

import { animals } from "./animals"; import { React } from "react"; import { ReactDOM } from "react-dom"; const title = "Click an animal for a fun fact"; const animalFacts = <h1>{title}</h1>; const background = <img className="background" alt="ocean" src='/images/ocean.jpg' />; ReactDOM.render(animalFacts, document.getElementById("root"));

The only result is the failing project since the parser doesn’t reparse the code.
Even when pasting in the above code. Nothing is parsed.

Hope somebody can help.

D

Hi pushpop,

Is this your code after step 4 or is this it after resetting?

1 Like

I needed to use:

import animals from "./animals"; import React from "react"; import ReactDOM from "react-dom";

So I used the wrong syntax :smiley:

D

1 Like