1.

What is the difference between state and props in React?

Answer»
StateProps
This is the DATA maintained inside the component.This is the data passed in from a parent component.
The component within shall update itself using the setState function.These are read-only functions present in the child component and have to be updated manually.

Note: React is a widely used open-source library used for building interactive user interfaces. It is a web platform LICENSED under MIT. This is one of the very popular react interview questions.



Discussion

No Comment Found