awaitNotified()function

awaitNotified(pending: PromiseLike<ReactNode | undefined | void>): Promise<boolean>
ParamType
pendingPromiseLike<ReactNode
void>
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 via notifyThrown().

Examples

await awaitNotified(save());