State and props both holding information related to the component.
State
=======
Contain private information for the component to initialize, change, and use
We keep information into state , when we need to perform rendering.
Props
===========
Contain information set by the parent component and should not be changed.
Props are the way to pass data between component (component must have parent and child relation)
Props are immutable.
Тэги:
#State_vs_Props_in_ReactJS #ReactJS #State #Props #UI_framework #ReactJS_Tutorials