GraphReFlyTS

API Reference

jotaiAtom()

Creates a jotai atom.

Import

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

Signature

function jotaiAtom(
	node: Node<T> | WritableNode<T>,
	opts: SubscribeValuesOptions<T> | WritableStoreOptions<T> = {},
): JotaiAtom<T> | WritableJotaiAtom<T>

Parameters

ParameterTypeDescription
nodeNode<T> | WritableNode<T>node value used by the helper.
optsSubscribeValuesOptions<T> | WritableStoreOptions<T>Options that configure the helper.

Returns

The jotai atom result.

Example

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

Source

packages/ts/src/adapters/store.ts