Skip to content
PACKAGES

readableStore()

Build a Svelte/Nanostores-style readable store from a GraphReFly Node.

import { readableStore } from "@graphrefly/ts/adapters";
function readableStore(
node: Node<T>,
opts: SubscribeValuesOptions<T> = {},
): ReadableStore<T>
ParameterTypeDescription
nodeNode<T>Node to observe, adapt, or connect.
optsSubscribeValuesOptions<T>Options that configure the helper.

A ReadableStore<T> value.

import { readableStore } from "@graphrefly/ts/adapters";

packages/ts/src/adapters/store.ts