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

jugnu gill
jugnu gill
1,779 Points

The exercise is not working for me. I still see loading in browser and react Dom error in console.

The exercise is not working for me. I see error in console saying can't find ReactDOM

Laura Jackson
Laura Jackson
9,519 Points

I am getting that too. It's annoying and there is nothing different to the video. Even when I have downloaded the it is not working.

Even when using workspaces it comes up with the error:

app.jsx:1 Uncaught ReferenceError: ReactDom is not defined at eval (eval at (babel-browser.min.js:4), <anonymous>:4:1) at (babel-browser.min.js:4) at exec (babel-browser.min.js:4) at babel-browser.min.js:4 at XMLHttpRequest.xhr.onreadystatechange (babel-browser.min.js:4) (anonymous) @ app.jsx:1 @ babel-browser.min.js:4 exec @ babel-browser.min.js:4 (anonymous) @ babel-browser.min.js:4 xhr.onreadystatechange @ babel-browser.min.js:4 XMLHttpRequest.send (async) transform.load @ babel-browser.min.js:4 run @ babel-browser.min.js:4 runScripts @ babel-browser.min.js:4

3 Answers

Ernesto Salazar
Ernesto Salazar
21,526 Points

Laura Jackson The error says that ReactDom is not defined while is actually ReactDOM :D

It didn't work for me initially, I had a typo, the code I used:

ReactDOM.render(<h1>Hello!</h1>, document.getElementById('container'));

It worked when I typed the final code:

function Application() {
    return (
            <h1>test working</h1>

ReactDOM.render(<Application/>, document.getElementById('container'));