Skip to content

Commit

Permalink
📝 fix lifecycle example to async (umijs#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
gongshun authored Aug 12, 2020
1 parent 3c364c2 commit 940ca6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ A criterion for judging whether the business is closely related: <strong>Look at
If you need to support the main application to manually update the micro application, you need to export an update hook for the micro application entry:

```ts
export function mount(props) {
export async function mount(props) {
renderApp(props);
}
// Added update hook to allow the main application to manually update the micro application
export function update(props) {
export async function update(props) {
renderPatch(props);
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/api/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,12 @@ toc: menu
如果需要能支持主应用手动 update 微应用,需要微应用 entry 再多导出一个 update 钩子:

```ts
export function mount(props) {
export async function mount(props) {
renderApp(props);
}
// 增加 update 钩子以便主应用手动更新微应用
export function update(props) {
export async function update(props) {
renderPatch(props);
}
```
Expand Down

0 comments on commit 940ca6d

Please sign in to comment.