Props vs State

  • In a React component, props are variables passed to the child component by its parent component. State on the other hand are still variables, but directly initialized and managed by the component itself, in which they are initialized.
  • props are immutable. Whereas, state is mutable.

Difference must be clear to you, as of now. But will cover some of the use-cases to explain when to use props & state.

← State & Lifecycle methodsConcept of Virtual DOM in React →