# Type alias SubApp<ComponentType>

SubApp<ComponentType>: {
Component?: ComponentType;
wantFeatures?: SubAppFeatureFactory[];
}

Base type for a generic implementation of a SubApp.

An actual subapp implementation should use a type derived from this for a specific framework. For example, `ReactSubApp` for React.

#### Type Parameters

- ComponentType

#### Type declaration

- ##### `Optional` Component?: ComponentType

  The component for this subapp.

  If it's undefined, then this subapp is treated to have no UI component

- ##### `Optional` wantFeatures?: SubAppFeatureFactory[]

  Extra features that the subapp wants. Should be initialized with the feature provider function

  - The intent is to allow a module to provide one or more features for a subapp.

  - Typically the feature needs to have implementation for server and client side, and exposed through the main/browser fields in package.json.

  - The feature is access through an API function. The API should return another function to be called by the subapp system later, and the subapp's info will be passed.

- Defined in subapp/types.ts:415