The initial value of the Atom.
Optional
options: { Options
A function that compares two values to determine if they are equal.
The name of Atom.
A new Atom instance with the given value and options.
const count = atom(0);
count.subscribe(() => {
console.log(count.value);
});
count.value = 1;
Creates a new Atom instance. An Atom is a reactive primitive that holds a value. Same as
atom
but returns a new Atom instance.