You need to do this in order for this to refer to the object instance of the React component class in your callback code, otherwise this will be undefined. An alternative is to use arrow functions in your event handlers and ‘this’ will be initialized as expected.