Function: wrapStore()

June 23, 2026 ยท View on GitHub

coaction


coaction / api-docs / wrapStore

Function: wrapStore()

wrapStore<T>(store, getState?): StoreReturn<T>

Defined in: packages/core/src/wrapStore.ts:12

Convert a store object into Coaction's callable store shape.

Type Parameters

T

T extends object

Parameters

store

Store<T>

getState?

(...args) => T

Returns

StoreReturn<T>

Remarks

Framework bindings use this to attach selector-aware readers while preserving the underlying store API on the returned function object. Most applications should call create instead of using wrapStore() directly.