build method

  1. @override
ReactElement build(
  1. Map props, [
  2. List<ReactNode?> childrenArgs = const []
])
override

Returns a new rendered component instance with the specified props and childrenArgs.

Necessary to work around DDC dart.dcall issues in github.com/dart-lang/sdk/issues/29904, since invoking the function directly doesn't work.

Implementation

@override
ReactElement build(Map props, [List<ReactNode> childrenArgs = const []]) {
  final children = generateChildren(childrenArgs, shouldAlwaysBeList: true);
  final convertedProps = generateExtendedJsProps(props);
  return React.createElement(type, convertedProps, children);
}