useCommand — reactive command dispatch with optional bus subscriptions.
Returns dispatch + reactive loading / lastError, plus register / on /
emit for managing handlers and listeners with auto-cleanup on scope disposal
(onScopeDispose). Vapor-safe — works in <script setup vapor> and VDOM alike,
with no getCurrentInstance() dependency. For fire-and-forget with zero reactive
overhead, use defineVaporCommand() instead.
(Absorbed the former useVaporCommand — the Vapor-safety distinction was obsolete;
this is now the single command composable.)
useCommand — reactive command dispatch with optional bus subscriptions.
Returns
dispatch+ reactiveloading/lastError, plusregister/on/emitfor managing handlers and listeners with auto-cleanup on scope disposal (onScopeDispose). Vapor-safe — works in<script setup vapor>and VDOM alike, with nogetCurrentInstance()dependency. For fire-and-forget with zero reactive overhead, usedefineVaporCommand()instead.(Absorbed the former
useVaporCommand— the Vapor-safety distinction was obsolete; this is now the single command composable.)