What is the difference between state and props?
State | Props |
---|---|
States are mutual | Props are immutable |
The state is set and updated by the object. | In props, you can pass properties from parent components. |
The state can be modified | Props can’t be modified. |
BY Best Interview Question ON 03 Mar 2023