Answer» | 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. | 11. What are refs used for in React? Refs are a function in React having the following uses: - Accessing DOM and React elements that you have created.
- Changing the VALUE of a child component without using props and others.
|