Skip to content

ctx.loading.completeOne

Represents a loading component to provides feedback to the user that their action is currently being run.

ts
await ctx.loading.start({
  Label: "Loading...",
  itemsInQueue: 100,
})

for (const user of users) {
  deleteUser(user)
  await ctx.loading.completeOne()
}
python
# the python SDK requires you to import ctx differently for pages vs actions
from forgeapp_sdk import ctx_var, action_ctx_var

# ctx = action_ctx_var.get() for actions
ctx = ctx_var.get()

await ctx.loading.start(
  "Loading...",
  items_in_queue=100
)

for user in users:
    delete_user(user)
    await ctx.loading.complete_one()

example of Forge app with ctx.loading.completeOne component