pivotick / AsyncContent / AsyncContentOptions
Interface: AsyncContentOptions
Defined in: interfaces/AsyncContent.ts:94
What the library shows while a content hook's promise is in flight, and what it shows if that promise rejects. Both are optional — the built-in skeleton and error affordance follow the active theme.
Synchronous hooks never see either of these: they commit in the same frame, exactly as they always did.
Example
ts
UI: {
asyncContent: {
placeholder: (surface) => surface === 'tooltip' ? 'Loading…' : mySkeleton(),
error: 'Could not load',
},
}Properties
error?
optionalerror:Renderable| (surface,error) =>Renderable
Defined in: interfaces/AsyncContent.ts:105
Shown in the slot when an async hook rejects. An aborted render is not a failure and never reaches this.
Default
ts
a compact themed error lineplaceholder?
optionalplaceholder:Renderable| (surface) =>Renderable
Defined in: interfaces/AsyncContent.ts:99
Shown in the slot while an async hook is pending.
Default
ts
a themed skeleton