writableAtom<R, W> function

WritableAtom<R, W> writableAtom<R, W>(
  1. AtomReader<R> reader,
  2. AtomWriter<R, W> writer
)

Creates an WritableAtom that can be used to implement custom write logic.

See stateAtomWithStorage for an example, where writes are intercepted and sent to a NucleusStorage instance.

Implementation

WritableAtom<R, W> writableAtom<R, W>(
  AtomReader<R> reader,
  AtomWriter<R, W> writer,
) =>
    _WritableAtomImpl(reader, writer);