[]previous and next page

ResourceState

Where a Resource is in its life: "unresolved" (no value and no fetch, for example while the source is falsy), "pending" (the first fetch is in flight), "ready" (a value is shown and nothing is in flight), "refreshing" (a value is shown while a newer fetch runs) or "errored" (the last fetch failed; reading the resource throws).

Where a Resource is in its life: "unresolved" (no value and no fetch, for example while the source is falsy), "pending" (the first fetch is in flight), "ready" (a value is shown and nothing is in flight), "refreshing" (a value is shown while a newer fetch runs) or "errored" (the last fetch failed; reading the resource throws).

Import#

ts
import type { ResourceState } from "@shadow-js/core";

Signature#

ts
type ResourceState = "unresolved" | "pending" | "ready" | "refreshing" | "errored"