readableStore()
Build a Svelte/Nanostores-style readable store from a GraphReFly Node.
Import
Section titled “Import”import { readableStore } from "@graphrefly/ts/adapters";Signature
Section titled “Signature”function readableStore( node: Node<T>, opts: SubscribeValuesOptions<T> = {},): ReadableStore<T>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
node | Node<T> | Node to observe, adapt, or connect. |
opts | SubscribeValuesOptions<T> | Options that configure the helper. |
Returns
Section titled “Returns”A ReadableStore<T> value.
Example
Section titled “Example”import { readableStore } from "@graphrefly/ts/adapters";Source
Section titled “Source”packages/ts/src/adapters/store.ts