Remote / foldkit-remote/why
why
function · packages/remote/src/why.ts:204
function why<Domain extends AnyDomain>(
domain: Domain,
model: ModelOfDomain<Domain>,
projection: Projection<ModelOfDomain<Domain>, RemoteData<unknown>>,
options?: ExplainOptions<ModelOfDomain<Domain>>,
): ReadWhyWhy a read shows what it shows. Any Remote read: Data.get, live
or Data.query, or a projection made of them.
because is every fact the Model holds about what it reads, as typed
references: a list or a row's fields missing, stale, in flight or
failed; a pending write showing a value, and which where term put a row
in a list or took it out. The reason that decides the state comes first,
and message says it, with what restarts it. For Initial, given
surfaces (the record subscriptions takes), it tells the two wiring
mistakes apart: no active Surface reads it, or one does and Remote's
Subscriptions are not running. Pure: it reads the Model and plans nothing.