Skip to content

Interface: BaseAtom<T>

API / @xmachines/play-atom / BaseAtom

Defined in: play-atom/src/types.ts:74

The common base of a writable atom and a computed atom

Use it for a value that a caller reads and observes, when the caller must accept both kinds.

Extends

Extended by

Type Parameters

Type Parameter
T

Methods

get()

get(): T;

Defined in: play-atom/src/types.ts:59

Returns

T

Inherited from

Readable.get


subscribe()

Call Signature

subscribe(observer): AtomSubscription;

Defined in: play-atom/src/types.ts:60

Parameters
ParameterType
observerAtomObserver<T>
Returns

AtomSubscription

Inherited from

Readable.subscribe

Call Signature

subscribe(
next,
error?,
complete?
): AtomSubscription;

Defined in: play-atom/src/types.ts:61

Parameters
ParameterType
next(value) => void
error?(error) => void
complete?() => void
Returns

AtomSubscription

Inherited from

Readable.subscribe