Returns true if the given value is an Atom.

function isAtom(value: unknown): value is Atom<unknown>

Example

const myAtom = atom('test', 42)
const notAtom = 'hello'

console.log(isAtom(myAtom)) // true
console.log(isAtom(notAtom)) // false

Parameters

NameDescription

value

unknown

The value to check

Returns

value is Atom<unknown>

True if the value is an Atom, false otherwise

Prev
getComputedInstance
Next
isSignal