Skip to content

Collections

Give each collection row its own reactive value, so an edit updates the readers of that row. Use a lookup for arbitrary requested keys and a selector for selection membership.

  • Projections: keyed and index rows, factory lifetimes, pending rows and UI lists.
  • Lookups: one derived value per requested key.
  • Selectors: selection membership that wakes only the two ends of a change.
  • Deep and keyed updates: immutable updates, focused reads and editable keyed collections.
  • Collection views: filtering, mapping, sorting, grouping and paging.
  • Aggregates: incremental totals, counts and folds over rows.

Start with Signals and Memos. For loading and errors, see Async and pending.

Use createKeyedCollection keyOf when updates arrive one item at a time. Its Rows property feeds the same views and aggregates as a projection over an immutable collection. Use NewKeyReader() for membership and order, or NewValueReader() for settled row changes too; see Reading changes.

For renderers that create one view object per key, projections also offer create-first teardown ordering and createProjectionOnce, which stores a factory result without a row memo. The latter supports key readers but does not support value readers or collection view operators; see Store a factory result once per key.

Edit this page