Code Editor
Web Browser

To read a component's state, use the expression

var TodayImFeeling = React.createClass({ getInitialState: function () { return { mood: 'decent' }; }, render: function(){ return ( <h1> I'm feeling {this.state.mood}! </h1> ); } });

The above component class reads a property in its state from inside of its render function.

Just like this.props, you can use this.state from any property on the instructions object.

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