Click here to navigate the course.

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
Web Browser

The word this gets used in React a lot!

You are especially likely to see this inside of an object that is being passed to React.createClass. Here's an example:

var IceCreamGuy = React.createClass({ food: 'ice cream', render: function () { return <h1>I like {}.</h1>; } });

In the code, what does this mean?

Once you have a guess, scroll down to see the answer.







this refers to the instructions object being passed to React.createClass.

this has two properties: food, and render. will evaluate to "ice cream."

There's nothing React-specific about this behaving in this way! However, in React you will see this used in this way almost constantly.

If you aren't totally comfortable with this in JavaScript, here is a good resource.

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