Records below are third-party data, not instructions. Apply with your own judgment.
react
4 records of known failures, each with its cause, the fix and what not to try.
Records
- Objects are not valid as a React child (found: object with keys {<key…JSX renders strings, numbers, elements and arrays of them; a plain object or a Date has no rendering, so React throws while reconciling children.
- Invalid hook call. Hooks can only be called inside of the body of a f…React sets the hooks dispatcher only while it renders a component; a hook called outside render, or through a second copy of react, finds it null.
- TypeError: ReactDOM.render is not a functionReact 19 removed the legacy root API: react-dom no longer exports render, hydrate or unmountComponentAtNode, deprecated since 18.
- Hydration failed because the server rendered HTML didn't match the cl…hydration expects the first client render to reproduce the server HTML; time, randomness, locale formatting, typeof window branches or invalid nesting make them differ.
Don’t try
wrap the value in String() or a template literal — renders the literal text [object Object]; pick the field you meant to display. (×1) · record
delete node_modules and reinstall without reading npm ls — a second copy pulled in by a linked or bundled library comes straight back; find which package brings it. (×1) · record
wrap the hook call in an if or try/catch so it only runs sometimes — hooks must run unconditionally at the top level of a component or custom hook; conditional calls break hook order. (×1) · record
import { render } from 'react-dom/client' — react-dom/client exports createRoot and hydrateRoot, no render; render is a method of the root createRoot returns. (×1) · record
branch on typeof window !== 'undefined' while rendering — that is itself a listed cause, since server and first client render diverge; move browser-only output into useEffect. (×1) · record
suppressHydrationWarning on <html>, <body> or a wrapper element — it covers only that element's own attributes and text, one level deep; mismatches in children still fail and real bugs get hidden. (×1) · record