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
| Parameter | Type | Description |
|---|---|---|
node | Node<T> | WritableNode<T> | node value used by the helper. |
opts | SubscribeValuesOptions<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