GraphReFlyTS

API Reference

readableStore()

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

Import

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

Signature

function readableStore(
	node: Node<T>,
	opts: SubscribeValuesOptions<T> = {},
): ReadableStore<T>

Parameters

ParameterTypeDescription
nodeNode<T>Node to observe, adapt, or connect.
optsSubscribeValuesOptions<T>Options that configure the helper.

Returns

A ReadableStore<T> value.

Example

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

Source

packages/ts/src/adapters/store.ts