nanoAtom()
Creates a nano atom.
Import
Section titled “Import”import { nanoAtom } from "@graphrefly/ts/adapters";Signature
Section titled “Signature”function nanoAtom( node: Node<T> | WritableNode<T>, opts: SubscribeValuesOptions<T> | WritableStoreOptions<T> = {},): NanoAtom<T> | WritableNanoAtom<T>Parameters
Section titled “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
Section titled “Returns”The nano atom result.
Example
Section titled “Example”import { nanoAtom } from "@graphrefly/ts/adapters";Source
Section titled “Source”packages/ts/src/adapters/store.ts