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
To further elaborate on the answer, a React Element does not have any methods and nothing on the prototype. This also makes them fast.
"A ReactElement is a light, stateless, immutable, virtual representation of a DOM Element" - Glossary of React Terms
A react component render()
function returns a DOM tree of react elements behind the scenes (This is the virtual DOM btw). There is some complex mapping and diff logic involved, but basically these React elements map to the DOM elements.
You can also create a Element directly React.createElement(arg)
where arg can be a html tag name, or a React Component class.