Utilities
useAsyncLoading
Tracks every async task you run through it, and stays loading until all of them settle. Use it for one loading state over several requests.
Tracks every in-flight promise you pass to run(). loading stays true until all of them settle, so overlapping calls, or several buttons sharing one instance, don't make the state flicker. Button uses it for loading="auto" when an @click handler returns a promise.
Install
import { useAsyncLoading } from 'vael-ui'