useVaporAsyncCommand — async-aware command dispatch for Vapor components
used inside Suspense boundaries.
Vue 3.6.0-beta.10 introduced proper async component hydration under VDOM
Suspense. This composable wraps an AsyncCommandBus dispatch with reactive
loading/error state, making it safe for <script setup vapor> components
that await async operations.
Vue 3.6.0-beta.12: component context, fallthrough prop state, and render
effect state are restored after setup errors. The try/catch in dispatch
below captures command-bus errors; Vue now independently ensures its
internal runtime state is clean after any setup throw.
The dispatch function returns a Promise, matching the
AsyncCommandBus interface. Use this when your commands hit async transports
(HTTP bridge, WS bridge) and you need awaitable results.
useVaporAsyncCommand — async-aware command dispatch for Vapor components used inside Suspense boundaries.
Vue 3.6.0-beta.10 introduced proper async component hydration under VDOM Suspense. This composable wraps an AsyncCommandBus dispatch with reactive loading/error state, making it safe for
<script setup vapor>components that await async operations.Vue 3.6.0-beta.12: component context, fallthrough prop state, and render effect state are restored after setup errors. The try/catch in
dispatchbelow captures command-bus errors; Vue now independently ensures its internal runtime state is clean after any setup throw.The dispatch function returns a Promise, matching the
AsyncCommandBus interface. Use this when your commands hit async transports
(HTTP bridge, WS bridge) and you need awaitable results.