useCommand function

Module @runic-artifex/vue in @runic-artifex/vue 0.23.0

function useCommand<TArgs extends readonly unknown[], TReturn>(command: (...args: TArgs) => TReturn): CommandHandle<TArgs, Awaited<TReturn>>;

Tracks a command's pending state and failure as shallow refs, like useView, so the handle can be destructured. Call it in setup() or effectScope().run() (development builds warn otherwise). ```vue const { run: increment, pending } = useCommand(() => client.value?.increment()); <button :disabled="!client || pending"