Nothing was returned from render React Origin: On your device Last updated 13 Oct 2026

Error: Nothing was returned from render. This usually means a return statement is missing.

A component returned undefined (React 17 and earlier) — usually a missing return or a return followed by a line break.

Exact message you may see Nothing was returned from renderThis usually means a return statement is missing
Seen on: React

Meaning

Arrow functions with braces need an explicit return. A bare return followed by JSX on the next line returns undefined (automatic semicolon insertion). React 18 allows undefined but you’ll render nothing.

Common causes

  • Missing return in a function with braces
  • return followed by a newline before the JSX
  • Conditional branch without a return

⚡ Quick fix

  1. Return JSX explicitly or use parentheses: return ( <div/> )
  2. Return null for "render nothing"

Detailed fix by platform

React

  1. jsx
    function Card() {
      return (
        <div className="card" />
      );
    }

How to diagnose

  1. Component — Which one is named?
  2. Paths — Does every branch return?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Adjacent JSX elements — Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (React)Adjacent JSX elementsElement type is invalid — Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined (React)Element type is inval…Functions not valid as child — Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. (React)Functions not valid a…Invalid DOM property — Warning: Invalid DOM property `class`. Did you mean `className`? (React)Invalid DOM propertynon-boolean attribute — Warning: Received `true` for a non-boolean attribute `x`. (React)non-boolean attributeObjects are not valid as a React child — Error: Objects are not valid as a React child (React)Objects are not valid…React must be in scope — ReferenceError: React is not defined / 'React' must be in scope when using JSX (React)React must be in scopesetState during render — Warning: Cannot update a component (`Parent`) while rendering a different component (`Child`) (React)setState during renderNothing w…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.