What is the difference between Element and Component?
React Component | React Element |
---|---|
It is a simple function or class used for accepting input and returning a React element | It is a simple object used for describing a DOM node and the attributes or properties as per your choice. |
The React Component has to keep the references to its DOM nodes and also to the instances of the child components. | The React Element is an immutable description object, and in this, you cannot apply any methods. |
BY Best Interview Question ON 19 Jul 2020