registerAbstractComponent function

  1. @Deprecated('4.0.0')
ReactDartComponentFactoryProxy<Component> registerAbstractComponent(
  1. Type abstractComponentClass, {
  2. ReactDartComponentFactoryProxy<Component>? parentType,
})

Helper function that wraps registerComponent, 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 = registerAbstractComponent(`AbstractComponentClassName`);

Deprecated. Use registerAbstractComponent2 instead. Will be removed in the 4.0.0 release.

Implementation

@Deprecated('4.0.0')
ReactDartComponentFactoryProxy registerAbstractComponent(Type abstractComponentClass, {ReactDartComponentFactoryProxy? parentType}) =>
    registerComponent(() => DummyComponent(), componentClass: abstractComponentClass, parentType: parentType);