ctx.loading.start
Kicks off a loading spinner to provide context during any long-running action work. Can also be called with a single string argument as the label, or with no arguments to display only a spinner.
- TypeScript
- JavaScript
await ctx.loading.start({
label: "Reticulating splines...",
});
await ctx.loading.start("Label only shorthand");
await ctx.loading.start({
label: "Reticulating splines...",
});
await ctx.loading.start("Label only shorthand");
- TypeScript
- JavaScript
description
Optional
string
Secondary label providing additional context for the loading indicator.
itemsInQueue
Optional
number
Number of "items" your action needs to work through to complete loading. Subsequently calling `ctx.loading.completeOne` (e.g. within a loop) updates the indicator’s progress.
label
Optional
string
Primary label for the loading indicator.
Returns
null
description
Optional
string
Secondary label providing additional context for the loading indicator.
itemsInQueue
Optional
number
Number of "items" your action needs to work through to complete loading. Subsequently calling `ctx.loading.completeOne` (e.g. within a loop) updates the indicator’s progress.
label
Optional
string
Primary label for the loading indicator.
Returns
null
Did this section clearly explain what you wanted to learn?