From 940ca6df434febd41753cc64a92c1ce7c906a819 Mon Sep 17 00:00:00 2001 From: gongshun <2440606146@qq.com> Date: Wed, 12 Aug 2020 16:25:49 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20fix=20lifecycle=20example=20to?= =?UTF-8?q?=20async=20(#854)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/README.md | 4 ++-- docs/api/README.zh.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/README.md b/docs/api/README.md index 12259f98b..6cb952412 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -276,12 +276,12 @@ A criterion for judging whether the business is closely related: 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); } ``` diff --git a/docs/api/README.zh.md b/docs/api/README.zh.md index 0949376cb..41255ee03 100644 --- a/docs/api/README.zh.md +++ b/docs/api/README.zh.md @@ -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); } ```