What is the difference between React Component and React Element? The documentation mentions both but does not go into detail, some methods require components, other element
React Element
- It is a simple object that describes a DOM node and its attributes or properties you can say. It is an immutable description object and you can not apply any methods on it.
Eg -
React Component
- It is a function or class that accepts an input and returns a React element. It has to keep references to its DOM nodes and to the instances of the child components.
const SignIn = () => (
Sign In
);