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

**Code:** `Nothing was returned from render` · **Category:** React · **Seen on:** React

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/react/nothing-was-returned-from-render)
