Function: usePlayView()
API / @xmachines/play-vue / usePlayView
function usePlayView(): ViewContextValue;Defined in: packages/play-vue/src/actor-provider-context.ts:51
Returns the current ViewContextValue inside an ActorProvider tree.
Returns
Throws
When the caller is outside an
Example
import { usePlayView } from "@xmachines/play-vue";
const view = usePlayView();// view.spec, view.handlers, view.registryRead a field where you use it, and destructure it not. The return value is a Proxy
over the live context of the provider, so const { spec } = usePlayView() freezes at
the first read and the screen stops following the actor — with no error and no
warning. play-svelte and play-solid hold the same rule, for the same reason.