select<R> method

NeuronAtom<R> select<R>(
  1. R selector(
    1. T value
    )
)

Creates a new atom that selects a part of this atom's value.

The selected atom will only update when the selected value changes. It manages its subscription to the parent atom automatically (cold observable).

Implementation

NeuronAtom<R> select<R>(R Function(T value) selector) {
  return _SelectedAtom<T, R>(this, selector);
}