what are components?

In React, components are the building blocks of an app. Components can accept an input and returns a React element, describing how a section of the user interface should appear.

Here is an example of a component:

const Greet = () => <h1>Hello</h1>;

This component doesn’t take any input and returns a h1 element with the text ‘Hello’.

When naming a React component you should capitalise the first letter as it enables React to differentiate between HTML tags and components.