Async

A renderless component for awaiting promises to resolve; great for making HTTP requests. Supports showing pending, resolved, or rejected promises.

Features:

  • Provides abstraction for pending, error, and results logic for Promises.
  • Scoped slots for pending, rejected, and resolved states.

Example

This component is great for handling any asynchronous tasks that involve promises. For example, HTTP requests:

Handle pending states

Handle rejected errors

Access full state with default scoped slot

Dynamically assign promise

Call promise using refs