Professional Documents
Culture Documents
16 - State
16 - State
16 - State
STATE REACT
PRESENTER: MOHAMMAD ADIL
What Is State in ReactJS? REACT
React
PROPS
Component
immutable props
Un-changeable
properties Inside src folder
Function parameters
PROPS React
Component
Index.js / App.js <Student name=“Adil”/>
• 1. With Constructor
• 2. Without Constructor
Difference B/W Props And State
PROPS STATE
• Props get passed to the • State is created and managed
component. within the component.
• Function Parameters. • Variables.
• Props are immutable / un- • State is mutable / changeable.
changeable
Difference B/W Props And State
PROPS STATE
• props -> Functional • useState Hook –> Functional
Components Components.
• this.props -> Class • this.state -> Class Component
Components