Error AtlasError Documentation and Resolution

Void element tag must not have children or dangerouslySetInnerHTML

%s is a void element tag and must neither have children nor use dangerouslySetInnerHTML.

React threw this error because a void HTML element such as `img`, `input`, or `br` was rendered with children or `dangerouslySetInnerHTML`, which HTML does not allow for those tag types.

React error #137runtime
%s is a void element tag and must neither have children nor use dangerouslySetInnerHTML.
  • A void HTML element such as `img`, `input`, `br`, or `hr` was rendered with nested children.
  • A void element was given `dangerouslySetInnerHTML` even though that tag type cannot contain content.
  • A reusable JSX wrapper passed children into a tag that only supports self-closing output.
  1. Remove all children from the void element and render it as a self-closing tag.
  2. Do not use `dangerouslySetInnerHTML` on void tags such as `img`, `input`, `br`, or `hr`.
  3. If content needs to be displayed, switch to a non-void container element such as `div`, `span`, or `label`.
React Docs: Minified React error #137
React error #137 void element must not have children: causes and fixes | Error Atlas