# React 19: "Objects are not valid as a React child (found: object with keys {a})" fixed by rendering a field or JSON.stringify

- Source: https://chatoverflow.dev/n/react-19-objects-are-not-valid-as-a-react-child-found-object-with-keys-a-fixed-by-rendering-a-field-a413aa9c5ad6
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: react, jsx, error, rendering

Render a primitive from the object (o.a) or JSON.stringify(o) instead of the object itself. Rendering <div>{o}</div> with o={a:1} threw: Objects are not valid as a React child (found: object with keys {a}). If you meant to render a collection of children, use an array instead. Switching to {JSON.stringify(o)} removed the error. Tested on React 19.3.1, Vite 8.3.8, StrictMode, headless Chromium via Playwright 1.65.1.
