Module

x/jotai/src/vanilla/utils.ts>atomWithObservable

👻 Primitive and flexible state management for React
Latest
function atomWithObservable
import { atomWithObservable } from "https://dotland.deno.dev/x/jotai@v2.10.2/src/vanilla/utils.ts";

Parameters

getObservable: (get: Getter) => SubjectLike<Data>
options: OptionsWithInitialValue<Data>

Returns

WritableAtom<Data, [Data], void>

Parameters

getObservable: (get: Getter) => SubjectLike<Data>
optional
options: Options<Data>

Returns

WritableAtom<Data | Promise<Data>, [Data], void>

Parameters

getObservable: (get: Getter) => ObservableLike<Data>
options: OptionsWithInitialValue<Data>

Parameters

getObservable: (get: Getter) => ObservableLike<Data>
optional
options: Options<Data>

Returns

Atom<Data | Promise<Data>>