Overview
Collection factories sit on the atom namespace: atom.list, atom.advancedList, atom.stack, atom.queue, atom.Map, and atom.Set (capitalized to avoid clashing with instance .set / .map).
atom.list is for ordered UI rows with unique readonly keys (default id). Raw .set/.update throw — use setList, add, updateItem, etc. Primitives must go through createList first.
advancedList wraps a list with search, filters, sort, and pagination (static local pipeline or remote load). Map/Set are reactive wrappers around the native collections.
Which collection?
|
API
|
Shape
|
Prefer when
|
|---|---|---|
atom.array
| T[] | General arrays — see typed factories. |
atom.list
| Keyed rows | Dynamic UI lists needing stable unique ids. |
advancedList
| Controller | Search / filter / sort / page (or remote load). |
atom.stack / .queue
| LIFO / FIFO | Undo stacks, job queues. |
atom.Map / .Set
| Native Map/Set | Keyed bags / unique membership with reactive reads. |
atom.list — keyed rows
Unique readonly id stamped on add. updateItem mutates a row; delete by key.
stack + queue
LIFO push/pop vs FIFO enqueue/dequeue.
Map + Set
Native-shaped reactive collections. Reads (size, iteration, get/has) track.