// the find
posva/vue-promised
💝 Composable Promises & Promises as components
vue-promised wraps async state management (pending/resolved/rejected) into a composable and a renderless component for Vue 3, with built-in pending-delay logic to avoid spinner flicker. It's for Vue developers tired of writing the same isLoading/error/data boilerplate across every component that touches a promise. The library is tiny and from Eduardo San Martin Morote (posva), the author of Vue Router and Pinia.
The 200ms pending delay as a default is genuinely good UX thinking baked in rather than left as an exercise. The combined slot is the standout feature — giving you a single context object with isPending, isDelayElapsed, data, and error means you can do things like disable a search input during refresh without splitting your template across three slots. The previous-data-in-pending-slot behavior (keeping stale data visible while refreshing) handles a real UI pattern that most hand-rolled solutions get wrong. The composable and component share the same core logic, so you're not picking between two implementations with different behavior.
There's no cancellation story — if you swap the promise prop rapidly (e.g. search-as-you-type), you'll get race conditions where an older slow request resolves after a newer one, and the library silently overwrites data. AbortController integration is left entirely to the caller. The TypeScript signature for usePromise accepts a raw Promise (not just a Ref), but the component always watches a reactive prop, so the mental model diverges slightly between the two APIs. With VueUse's useAsyncState already in most projects, the overlap is significant and that composable handles more edge cases. The docs are all in the README with no dedicated site, which makes the combined slot context table hard to find when you actually need it.