Posted on under React by Owen Conti.
Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.
This warning happens when you're missing a
return
statement in your
render
function, or you attempt to return early, but return
void
via
return;
instead of returning
null
.
1function App() {2 if (props.loading) {3 return; // Bad! Should return `null` here instead4 }5 6 return null; // Fixed!7}
Hopefully you found this article useful! If you did, share it on X!
Found an issue with the article? Submit your edits against the repository.