Skip to content

Commit d5c6076

Browse files
committed
Revise
1 parent e53ab54 commit d5c6076

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

components/README.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,12 @@ _Author: [@Hunter-Gu](https://github.com/Hunter-Gu)_
8686
#### Signature
8787

8888
```js
89-
Await(
90-
{
91-
value, // A `Promise` object for asynchronous data
92-
container, // The container of the result. Default `div`
93-
Loading, // What to render when the data is being loaded
94-
Error, // What to render when error occurs
95-
},
96-
children,
97-
) => <The created UI element>
89+
Await({
90+
value, // A `Promise` object for asynchronous data
91+
container, // The container of the result. Default `div`
92+
Loading, // What to render when the data is being loaded
93+
Error, // What to render when error occurs
94+
}, children) => <The created UI element>
9895
```
9996

10097
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.

0 commit comments

Comments
 (0)