registerAbstractComponent2 function

ReactDartComponentFactoryProxy2<Component2> registerAbstractComponent2(
  1. Type abstractComponentClass, {
  2. ReactDartComponentFactoryProxy2<Component2>? parentType,
})

Helper function that wraps registerComponent2, and allows an easier way to register abstract components with the main purpose of type-checking against the abstract component.

The result must be stored in a variable that is named very specifically:

var $`AbstractComponentClassName`Factory = registerAbstractComponent2(`AbstractComponentClassName`);

Implementation

ReactDartComponentFactoryProxy2 registerAbstractComponent2(Type abstractComponentClass, {ReactDartComponentFactoryProxy2? parentType}) =>
    registerComponent2(() => DummyComponent2(), componentClass: abstractComponentClass, parentType: parentType);