over_react_invalid_child

Severity: AnalysisErrorSeverity.ERROR

Maturity: stable

Since 1.0.0

View the Project on GitHub workiva/over_react

Children of an OverReact component must be a ReactElement, Fragment, string, number, boolean, null, or an Iterable of those types

GOOD:

@override
render() {
  return Dom.div()(
    'Hi there',
  );
}

GOOD:

@override
render() {
  return Dom.div()(
    NavItem()('Nav'in it, you know?'),
  );
}

BAD:

@override
render() {
  return Dom.div()(
    NavItem()({
      'foo': 'bar',
    }),
  );
}