testJsComponentFactory top-level property

Function testJsComponentFactory
final

A factory for a JS composite component, for use in testing.

Implementation

final Function testJsComponentFactory = (() {
  var componentClass = React.createClass(ReactClassConfig(
    displayName: 'testJsComponent',
    render: allowInterop(() => react.div({}, 'test js component'))
  ));

  return ([props = const {}, children]) {
    return React.createElement(
        componentClass, jsifyAndAllowInterop(props), listifyChildren(children));
  };
})();