adspace
What is the difference between state and props in react js?
Answer Posted / Vaishali Vishnoi
{"state": "In React, the state is a data structure that stores the local state of a component. It can be mutated only by calling setState().",n"props": "Props (short for properties) are used to customize components. They are read-only and cannot be modified from within the component itself. Props are passed down through the component tree from a parent to a child."
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers