Skip to content

Function: usePlayView()

API / @xmachines/play-solid / usePlayView

function usePlayView(): ViewContextValue;

Defined in: packages/play-solid/src/ActorProvider.tsx:69

Hook to access the current view context inside an ActorProvider tree.

Returns

ViewContextValue

Throws

If called outside an ActorProvider (or PlayUIProvider) tree

Example

import { usePlayView } from "@xmachines/play-solid";
const MyRenderer: Component = () => {
const view = usePlayView();
return <Renderer spec={view.spec} registry={view.registry} />;
};