> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# `__CreateComponent`

## 介绍

创建 ComponentElement 对象。

## 语法

```jsx
__CreateComponent(componentParentUniqueID: number, componentID: string, cssID: Number, entryName: string, name: string, path: string, config: Record<string, any>|null|undefined, info: Record<string, any>|null|undefined): Element;
```

### 参数

|           Key           | 说明                                                                                                   |
| :---------------------: | ---------------------------------------------------------------------------------------------------- |
| parentComponentUniqueID | 指创建该 Element的 ComponentElement 的 Unique Component ID，是一个 number。                                     |
|       componentID       | 前端框架设置给 ComponentElement 的 componentID，是大小写敏感的字符串。                                                   |
|          cssID          | CSSFragment id，是一个 number 类型。                                                                        |
|        entryName        | 为当前 ComponentElement 所处的 [Lazy Bundle](/next/zh/guide/spec.md#lazy-bundle) 的 schema 信息，是一个大小写敏感的字符串。 |
|           name          | 为当前 ComponentElement 的前端定 name，是一个大小写敏感的字符串。                                                         |
|           path          | 为当前 ComponentElement 的前端 path，是一个大小写敏感的字符串。                                                          |
|          config         | 为当前 ComponentElement 的 config。                                                                       |
|           info          | ComponentElement 创建时所需的一些额外信息，该参数可以省略。                                                               |

### 返回值

返回 ComponentElement。

## 示例

前端框架可以按下如下的方法创建

```jsx
// main-thread.js
let element = __CreateComponent(0, '1', 1, '', 'name', 'path', {}, {});
```
