Reactのエラー一覧 > 本ページ
Objects are not valid as a React child
React 実在のエラーメッセージです。原因と解決方法を解説します。
原因
JSXにオブジェクトをそのまま埋め込んでいる
解決方法
文字列化(JSON.stringify)するか、必要なプロパティだけ描画する
エラー文の一部だけ分かる場合はエラーメッセージ検索に貼ると候補を即表示できます。
TypeScriptの設定起因ならtsconfig診断もどうぞ。
関連するReactのエラー
- Warning: Each child in a list should have a unique "key" prop.
- React Hook useEffect has a missing dependency
- Too many re-renders. React limits the number of renders to prevent an infinite l
- Cannot update a component while rendering a different component
- Rendered more hooks than during the previous render