awaitNotified()function
awaitNotified(pending: PromiseLike<ReactNode | undefined | void>): Promise<boolean>
| Param | Type | |
|---|---|---|
pending | PromiseLike<ReactNodevoid> | The promise-like value to await. |
| Return | |
|---|---|
Promise<boolean> | true if the value resolved, false if it rejected. |
Await a pending value and dispatch a success or error notice to the window based on its resolution.
- A resolved truthy value becomes a
"success"notice; a rejection becomes an"error"notice vianotifyThrown().
Examples
await awaitNotified(save());