From d5c60765ef62d43fedeb6a588a40e2bf0a3946a5 Mon Sep 17 00:00:00 2001 From: Tao Xin Date: Fri, 27 Oct 2023 17:27:05 -0700 Subject: [PATCH] Revise --- components/README.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/components/README.md b/components/README.md index 6f9bda51..328f4928 100644 --- a/components/README.md +++ b/components/README.md @@ -86,15 +86,12 @@ _Author: [@Hunter-Gu](https://github.com/Hunter-Gu)_ #### Signature ```js -Await( - { - value, // A `Promise` object for asynchronous data - container, // The container of the result. Default `div` - Loading, // What to render when the data is being loaded - Error, // What to render when error occurs - }, - children, -) => +Await({ + value, // A `Promise` object for asynchronous data + container, // The container of the result. Default `div` + Loading, // What to render when the data is being loaded + Error, // What to render when error occurs +}, children) => ``` The `children` parameter (type: `(data: T) => ValidChildDomValue`) is a function that takes the resolved data as input and returns a valid child DOM value (`Node`, primitives, `null` or `undefined`), used to indicate what to render after the data is loaded.