React · Frontend system thinking

What is the difference between a React element and a component?

EasyelementscomponentsrenderingUpdated Oct 2026
Quiz this track

Short answer

An element is an immutable description of UI, such as what type to render and which props to use. A component is a function or class that returns elements.

Elements are plain objects. They are cheap to create and describe what should appear. A component is the reusable code that produces those elements, often using props, state and hooks.

jsx
const element = <h1>Hello</h1>;

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

const componentElement = <Greeting name="Asha" />;

Why the distinction matters

  • Elements are immutable; you create a new one on each render
  • Components can hold state, run effects and return different elements over time
  • An element's type can be a string for a DOM tag or a function for a component
  • React instances are the internal state associated with a mounted component

A common interview trap is saying an element is a component instance. It is not. An element is a description; React creates and manages the instance when it renders that description.

Because elements are immutable, never mutate an element object and expect React to notice. Create a new element instead.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Can you mutate a React element?
  2. 2What is a component instance?
  3. 3What is the `type` field on an element?
  4. 4Why are elements cheap to create?

Say it in the interview

A React element is an immutable object that describes UI, including the type and props. A component is a function or class that returns elements and can hold state and effects. Elements are created constantly during render; components are the reusable units that produce them. An element is not a component instance, which is React's internal mounted state.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live React mock interview and get scored feedback on depth, clarity and confidence.