Skip to content

Framework adapters

Framework adapters connect Starbeam reads, resources, services, and element resources to framework rendering and lifecycle.

Use the guide for your framework for full examples. This page is a quick API map.

FrameworkRead boundaryResourcesServicesElement resources
ReactuseReactive(compute, bridge?)useResource(blueprint, bridge?)Starbeam plus useService(blueprint)useElementResource(build, bridge?)
Preactinstall(options) tracks render readsuseResource(blueprint, deps?)useService(blueprint)useElementResource(build, bridge?)
EmberGlimmer autotracking sees Starbeam readssetupResource(blueprint, parent)setupService(blueprint, owner?)elementResourceModifier(blueprint, options?)
VueuseReactive() or setupReactive(blueprint)setupResource(blueprint)Starbeam plugin plus setupService(blueprint)elementResourceDirective(blueprint, options?)
SveltefromStarbeam(compute)Not exposed yetNot exposed yetelementResource(blueprint)

Package: @starbeam/react

APIUse for
StarbeamEstablish app lifetime for React services.
useReactive(compute, bridge?)Read Starbeam-backed values at the React render boundary.
useResource(blueprint, bridge?)Attach a resource to a React component lifetime.
useElementResource(build, bridge?)Attach element-backed resource work to a callback ref.
useService(blueprint)Resolve app-scoped service state.
useSetup(setup) / useProp(variable, description?)Lower-level setup helpers.

Use bridge for changing non-Starbeam values captured by the callback. Omit it when there is nothing to bridge.

Package: @starbeam/preact

APIUse for
install(options)Install Starbeam into Preact render/lifecycle hooks.
useResource(blueprint, deps?)Attach a resource to a Preact component lifetime.
useElementResource(build, bridge?)Attach element-backed resource work to a callback ref.
useService(blueprint)Resolve app-scoped service state under the installed root.
useReactive / setup* / createCellLower-level APIs, not the main Preact path.

After install(options), direct render reads are the main Preact output boundary.

Package: @starbeam/vue

APIUse for
StarbeamVue plugin for app-scoped service ownership.
useReactive()Make direct Starbeam reads visible to the current Vue component.
setupReactive(blueprint)Expose a Starbeam read as a Vue ref.
setupResource(blueprint)Attach a resource to Vue component setup/lifecycle.
setupService(blueprint)Resolve app-scoped service state.
elementResourceDirective(blueprint, options?)Attach element-backed work to a Vue directive.
elementResource(blueprint)Experimental lower-level handle with a directive and ref.

Package: @starbeam/ember

APIUse for
Native Glimmer tag mirrorMake Starbeam reads visible to Ember templates and getters.
fromStarbeam(compute, options?)Explicit read bridge object with current and disconnect().
setupResource(blueprint, parent)Attach a resource to an Ember destroyable lifetime.
setupReactiveResource(blueprint, parent)Explicit current wrapper for a resource value.
setupService(blueprint, owner?)Resolve owner-scoped service state.
useResource(parent, blueprint) / resourceHelper-backed resource setup.
elementResourceModifier(blueprint, options?)Attach element-backed work to an Ember modifier.
elementResource(blueprint)Handle pairing a modifier with a tracked current value.

Plain templates and getters can read Starbeam-backed domain objects directly. Use fromStarbeam() when a stable explicit bridge object is useful.

Package: @starbeam/svelte

APIUse for
fromStarbeam(compute)Experimental Svelte 5 read bridge for templates, $derived, and effects.
elementResource(blueprint)Primary Svelte 5 attachment API.
elementResourceStore(blueprint)Explicit store-shaped spelling.
elementResourceAttachment(blueprint, options?)Lower-level attachment sink.

The Svelte adapter does not expose component-resource or service helpers yet. Deeper integration is tracked in starbeamjs/starbeam#261.