---
title: createApp
---
# createApp

:::warning
Soon to be deprecated, it is recommended to use [`createRoot`](/apis/app/runtime/core/create-root).
:::

Used for creating custom entries and customizing runtime plugins.

## Usage

```ts
import { createApp } from '@modern-js/runtime';
```

## Function Signature

```ts
import type { Plugin } from '@modern-js/runtime';

function createApp(options: { plugins: Plugin[] }): React.ComponentType<any>;
```

### Input

- `options`: optional configuration.
  - `plugins`: custom plugin extensions.

## Example

### Create Custom Entry

For details, see [`bootstrap`](./bootstrap.mdx).

### Custom Plugins

```ts
import { createApp } from '@modern-js/runtime';

function App() {
  return <div>app</div>;
}

export default createApp({
  plugins: [customPlugin()],
})(App);
```
