Skip to content

Commit

Permalink
update Readme (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
yinxulai authored May 26, 2024
1 parent 380ad4a commit 3508924
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ app.mount(document.getElementById('app'));

创建一个应用实例。

```ts
interface AirxApp {
mount: (container: HTMLElement) => AirxApp
}

function createApp(element: AirxElement<any> | AirxComponent): AirxApp
```

### provide

```ts
Expand Down Expand Up @@ -105,6 +113,10 @@ function onUnmounted(listener: UnmountedListener): void

注册 DOM 卸载回调,必须直接或间接在组件内部同步调用。

## React 开发者注意

- Css 属性没有任何隐式大小写转换(与 HTML 规范保持一致)

## 许可证

该项目使用 MIT 许可证。详细信息请参阅 [LICENSE](LICENSE) 文件。
Expand Down
5 changes: 4 additions & 1 deletion source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ export {
} from './render'

export interface AirxApp {
plugin: (...plugins: Plugin[]) => AirxApp
mount: (container: HTMLElement) => AirxApp

/** @deprecated WIP */
plugin: (...plugins: Plugin[]) => AirxApp
/** @deprecated WIP */
renderToHTML: () => Promise<string>
}

Expand Down

0 comments on commit 3508924

Please sign in to comment.