isAtom
See source codeReturns 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
Name | Description |
---|---|
|
The value to check |
Returns
value is Atom<unknown>
True if the value is an Atom, false otherwise
Prev
getComputedInstanceNext
isSignal