--- title: State vs Props --- ## State vs Props When we start working with React components, we frequently hear two terms. These are `state` and `props`. So, in this article we will explore what those are and how they differ. ## State: * State is something that a component owns. It belongs to that particular component where it is defined. For example, A person's age is a state of that person. * State is mutable. But it can only be changed by the component itself, meaning it is private. As I only can change my age, no one else can. * You can change the state by using `this.setState()` See the below example to get an idea of state: #### Person.js ```javascript import React from 'react'; class Person extends React.Component{ constructor(props) { super(props); this.state = { age:0 this.incrementAge = this.incrementAge.bind(this) } incrementAge(){ this.setState({ age:this.state.age + 1; }); } render(){ return(