awaitNotifiedForm()function
awaitNotifiedForm(store: FormStore<T>, form: HTMLFormElement, pending: PromiseLike<ReactNode | undefined | void>): Promise<boolean>
| Param | Type | |
|---|---|---|
store | FormStore<T> | The FormStore the form is bound to. required |
form | HTMLFormElement | The underlying HTMLFormElement notices are anchored to. required |
pending | PromiseLike<ReactNodevoid> | The pending result to await. |
| Return | |
|---|---|
Promise<boolean> | A Promise resolving to true on success or false on failure. |
Await a pending submit result and publish a success or error notice to a form once it settles.
Examples
await awaitNotifiedForm(store, formEl, pending)