Skip to content

Render

In one line

Render is the process of a component evaluating its props and state to produce the JSX (virtual DOM) that describes the UI.

In simple words

In React, "render" has two meanings: (1) the component function executing and returning JSX, and (2) React updating the real DOM to match that JSX.

When state or props change, React calls the component function again — this is a render. The function returns new JSX (a new virtual DOM tree). React compares this to the previous tree (reconciliation) and updates the real DOM with the minimal changes.

A render does not always mean the DOM changes — if the JSX is identical, React skips the DOM update. Also, a parent rendering causes all children to render by default (unless memoized). Rendering is cheap; DOM mutations are expensive. React's optimization is to minimize DOM mutations.

Example

jsx
function Clock({ time }) {
  // This function "renders" — it runs and returns JSX
  return <h1>It is {time}</h1>;
}

// When `time` changes, React calls Clock() again (re-render),
// diffs the new JSX, and updates only the changed text.

Each time time changes, React re-renders the Clock component by calling the function again, then updates the DOM.

Related terms

Related Resources

Related Lessons

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary