React State

Learn about how we store data in React using properties, state, and context.

React’s state and properties

React uses three different ways to store information in the application:

  • Properties (or “props” for short)
  • State
  • Context

We just talked about how properties are passed to a React component, so now let’s talk about state and how it differs from properties. While both props and state store data, properties get passed into a component and are immutable, whereas state is managed and updated inside ...

State being updated