Skip to main content
@juo/blocks/vue is the Vue 3 adapter. It exposes a createVueRenderer for the block renderer slot and a useContext composable that returns service signals as Vue refs.
The patterns below extend the Blocks, Reactivity, and Contexts concept pages with Vue-specific equivalents.

Defining a Vue block

createVueRenderer mounts the component inside a <juo-context-root>-aware wrapper. Children rendered by Vue can call useContext and resolve the host’s services.

Reading services with useContext

useContext returns a proxy where every Signal<T> field appears as a Ref<T> — drop it into templates, computed, and watch like any Vue ref.
The $ accessor returns the underlying signal when direct signal access is required:

Providing contexts from Vue

Use useProvideContext inside a wrapping component:

Bridging Vue refs and signals

The @juo/blocks/vue entry also exposes toSignal and toRef for the rare cases where crossing the boundary manually is needed:
These utilities are available for cases where crossing the boundary manually is required. The useContext proxy returns refs for most use cases.