My Blog

My WordPress Blog

My Blog

My WordPress Blog

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
What are the differences between state and props?

Leave a Reply

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

Scroll to top