Core API Reference
July 12, 2026 ยท View on GitHub
coaction
Core API Reference
This reference is generated from the documentation-only catalog in
packages/core/api-docs.ts. The catalog combines symbols from the root entry
and the public subpaths; it does not imply that every listed symbol is exported
from coaction.
Import Map
| Import path | Intended use |
|---|---|
coaction | Compatibility entry that selects local or shared behavior from runtime options. |
coaction/local | Transport-free local stores and local signal/lifecycle helpers. |
coaction/shared | Shared authority/client stores, the JSON protocol, and reconnect behavior. |
coaction/adapter | External-store adapter contracts, snapshots, patch helpers, and reactive utilities. |
Primary Entry Points
- create: exported by
coactionandcoaction/shared; creates local stores, shared main stores, and shared clients. - create from coaction/local: documentation name
for the transport-free implementation exported as
createbycoaction/local.createLocalis not a root-package export. - Store and MiddlewareStore: runtime store contracts.
- StoreOptions and ClientStoreOptions: creation options for main/local and client stores.
- Slice and Slices: state-factory signatures.
- Middleware: store enhancement contract.
- defineExternalStoreAdapter:
exported by
coaction/adapter; third-party whole-store adapter helper.createBinderremains available there as the compatibility name. - createReactiveTracker: exported by
coaction/adapter; low-level signal dependency tracker for framework adapters that need render/effect invalidation without selectors. - wrapStore: exported by
coaction/localandcoaction/adapter; low-level helper used by framework bindings. signal,computed,effect,effectScope,trigger, batching helpers, and introspection helpers: alien-signals primitives re-exported for advanced integrations.
Semantics Worth Reading First
- Prefer explicit
sliceModewhen passing an object whose enumerable values are all functions. - Native immutable store writes must happen inside
set(); directthis.count += 1writes outside that update boundary are rejected. - Client stores mirror shared state and their methods return promises because execution happens on the main store.
- Methods destructured from
getState()keep the correctthisbinding. - Getter accessors and
get(deps, selector)computed values are cached through the built-in alien-signals runtime. - Binder-backed integrations are whole-store adapters; slices mode is not supported for them.
create()should not gain more ambiguous option combinations; prefer explicit helpers or variants for future expansion.