← React Beginner Questions - Set 7 Q63

What is a component in React?

React Beginner Questions - Set 7

Example

function Greeting({ name }) {
  return <p>Hello, {name}</p>;
}

// used as <Greeting name="Ana" />
// a component IS a function that returns JSX

What to notice

← Back to the question list