The JavaScript this value determines which object a function call supplies as its context. In component code, the intended context is often the component instance, because render callbacks and event handlers need access to state and methods. section 9.3.1 section 11.2.1
Component implementations use this to connect callbacks with the objects they operate on:
- An event handler can call component methods such as this.updateState(). section 10.5
- A parent’s handler must retain the parent component as its this value when a child emits an event. section 11.2.1
Binding a render callback
A callback passed to defineComponent() is not automatically a class method. Calling render() directly can make this refer to Window, or undefined in strict mode, causing this.state.count to fail. Calling render.call(this) supplies the component instance explicitly.



