What are the differences between state and props?

StateProps
UseHolds information about the componentsAllows to pass data from one component to other components as an argument
MutabilityIs mutableAre immutable
Read-OnlyCan be changedAre read-only
Child componentsChild components cannot access Child component can access 
Stateless componentsCannot have stateCan have props

Comments

Leave a Reply

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