React & Next.js errors · Error 06 of 7
“Objects are not valid as a React child”
By Muhammad Abdullah, full-stack, mobile and ai automation developer · Last reviewed
Objects are not valid as a React child (found: object with keys {…})Short answer
You are rendering a whole object (or a Date, or a Promise) in JSX. Render a specific field, format the value as a string, or map an array to elements.
Common causes
- Rendering an API response object directly, e.g.
{user}instead of{user.name}. - Rendering a Date object, or an async function’s Promise.
How to fix it
Render a field or a formatted string:
<p>{user.name}</p> <p>{createdAt.toLocaleDateString()}</p>While debugging, inspect the value with
JSON.stringify(value, null, 2).