Yielded properties
These are yielded properties by <Await /> component:
dataLast resolved promise value, maintained when new error arrives.errorRejected promise reason, cleared when new data arrives.valueThe value ofdataorerror, whichever was last updated.initialValueThe data or error that was provided through theinitialValueargument.startedAtWhen the current/last promise was started.finishedAtWhen the last promise was fulfilled or rejected.statusOne of:initial,pending,fulfilled,rejected.isInitialtrue when no promise has ever started, or one started but was cancelled.isPendingtrue when a promise is currently awaiting settlement. Alias:isLoadingisFulfilledtrue when the last promise was fulfilled. Alias:isResolvedisRejectedtrue when the last promise was rejected.isSettledtrue when the last promise was fulfilled or rejected (not initial or pending).counterThe number of times a promise was started.queryAn reference to the internal Query wrapper, which can be chained on.runInvokes thedefer.reloadRe-runs the promise when invoked.cancelCancel any pending promise.
data
data
any
Last resolved promise value, maintained when new error arrives.
error
error
Error
Rejected promise reason, cleared when new data arrives.
value
value
any | Error
The data or error that was last provided (either through initialValue or by settling a promise).
initialValue
initialValue
any | Error
The data or error that was originally provided through the initialValue argument.
startedAt
startedAt
Date
Tracks when the current/last promise was started.
finishedAt
finishedAt
Date
Tracks when the last promise was resolved or rejected.
status
status
string
One of: initial, pending, fulfilled, rejected.
isInitial
isInitial
boolean
true while no promise has started yet, or one was started but cancelled.
isPending
isPending
boolean
true while a promise is pending (loading), false otherwise.
Alias: isLoading
isFulfilled
isFulfilled
boolean
true when the last promise was fulfilled (resolved to a value).
Alias: isResolved
isRejected
isRejected
boolean
true when the last promise was rejected.
isSettled
isSettled
boolean
true when the last promise was either fulfilled or rejected (i.e. not initial or pending)
counter
counter
number
The number of times a promise was started.
query
query
Query
A reference to the internal wrapper Query created when initializing the component. It contains all the internal API, exposed as public by this component. More about Query, soon.
Useful as a chainable alternative to the onResolve / onReject callbacks.
run
run
function(...args: any[]): Query
Runs the defer, passing any arguments provided as an array.
reload
reload
function(): Query
Re-runs the promise when invoked.
cancel
cancel
function(): void
Cancels the currently pending promise by ignoring its result.
Last updated
Was this helpful?