Function components

A React function component is a function that receives props and returns JSX describing part of the interface. Its name starts with a capital letter. Components compose with one another and must stay pure: the same props and the same state give the same render.

Example

function Bonjour({ nom }) {
  return <h1>Hello {nom}</h1>;
}

Related concepts

The whole glossary