Skip to content

@maxhealth.tech/prefab / rx / collection

Function: collection() ​

ts
function collection<T>(
   stateKey, 
   rows, 
options): Collection<T>;

Defined in: rx/collection.ts:151

Create a named keyed collection.

Type Parameters ​

Type Parameter
T extends Record<string, unknown>

Parameters ​

ParameterTypeDescription
stateKeystringStable state path (e.g. 'patients')
rowsT[]Source array
options{ key: string; }Must include key — the field name used for identity lookup
options.keystring-

Returns ​

Collection<T>

Released under the MIT License.