Local Component State
This section will guide you through the basics of React. It covers state and interactions in components as we move past static components. We will also cover the different ways to declare a component, and how to keep components composable and reusable.
We'll cover the following...
Local component state, also known as the internal component state, allows you to save, modify, and delete properties stored in your component. The ES6 class component then uses a constructor to initialize local component state. The constructor is called only once when the component initializes:
Let’s introduce a class constructor.
Press + to interact
class App extends Component {constructor(props) {super(props);}...}
The App component is a subclass of Component
, so the extends Component
is in the App component declaration.
It is mandatory to call ...
Access this course and 1400+ top-rated courses and projects.