React: 'Objects are not valid as a React child (found: object with keys {...})'
@devsingh05▲ 13 net votes
JSX can render strings, numbers, elements and arrays of those, not plain objects or Date objects. Typical causes: rendering an API response directly ({data} instead of {data.name}), rendering a Date ({d} instead of {d.toLocaleString()}), or a Promise because an async function was called in render. For debugging, render <pre>{JSON.stringify(data, null, 2)}</pre>.