JavaScript React Basics Understanding State Bind Event Handlers to Components

What does Component instance mean?

When you create a class component that extends from React.Component, any custom methods you create are not bound to the component by default. You need to bind your custom methods, so that this refers to the component instance. In this video, we'll go over the ways to bind the this context in React.

2 Answers

36,591 Points

Hi Ula,

This sounds like OOP(object oriented programming). The teacher is saying that React.Component is a class. You have the ability in OOP to create your own definitions without impacting the original class, which is called creating an instance of the class.

Here, the teacher is saying that he will create a component variable based on the original class. Does this make sense?


i think React.Component is a function constructor