@tempots/ui
ResourceDisplay() function
Component to display an asynchronous resource based on its current status.
V - The type of the value when the resource is successfully loaded. E - The type of the error when the resource fails to load.
Signature:
ResourceDisplay: <V, E>(resource: AsyncResource<V, E>, options: ResourceDisplayOptions<V, E>) => import('@tempots/dom').Renderable
Parameters
Parameter |
Type |
Description |
---|---|---|
resource |
AsyncResource<V, E> |
The asynchronous resource to display. |
options |
ResourceDisplayOptions<V, E> |
The display options for the resource. |
Returns: import('@tempots/dom').Renderable
{TNode} A node representing the current state of the resource.