over_react_variadic_children

Severity: AnalysisErrorSeverity.INFO

Maturity: stable

Since 1.0.0

View the Project on GitHub workiva/over_react

PREFER using variadic children when possible.

GOOD:

@override
render() {
  return Dom.ul()(
    Dom.li()('Item 1'),
    Dom.li()('Item 2'),
  );
}

BAD:

@override
render() {
  return Dom.ul()([
    (Dom.li()..key = 1)('Item 1'),
    (Dom.li()..key = 2)('Item 2'),
  ]);
}