React JS State vs Props

Below is the table summarizing the differences between State and Props in React:

StateProps
Private data store for a componentData passed from a parent component to its child component
Editable (Mutable)Read-only (Immutable )
State cannot be accessed by child components Props can be accessed by the child component. 
Affects render of the componentDoes not affect render of the component
Can be updated using setState methodCannot be updated within the child component

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top