Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Code Editor

Now take a look at the code on line 2:

var ReactDOM = require('react-dom');

require('react-dom') is very similar to require('react'). It also returns a JavaScript object, which contains React-related methods.

However, there is a difference!

The methods returned by require('react-dom') are for interacting with the DOM. You'are already familiar with one of them: ReactDOM.render.

The methods returned by require('react') don't deal with the DOM at all. They don't engage directly with anything that isn't part of React. They are for pure React purposes, such as creating components or writing JSX elements.

Report a Bug
If you see a bug or any other issue with this page, please report it here.