Nothing was returned from render ⚛️ React

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.

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 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.