parent destroyable context, unually
Array of non-primitives to map over
This can be class instances, plain objects, or anything supported by WeakMap's key
How to transform each element from
similar to if you were to use Array map yourself.
This function will be called only when needed / on-demand / lazily.
Generated using TypeDoc
Reactivily apply a
mapfunction to each element in an array, persisting map-results for each object, based on identity.
This is useful when you have a large collection of items that need to be transformed into a different shape (adding/removing/modifying data/properties) and you want the transform to be efficient when iterating over that data.
A common use case where this
mapresource provides benefits over is
Even though the above is
@cached, if any tracked data accessed during the evaluation of
wrappedRecordschanges, the entire array.map will re-run, often doing duplicate work for every unchanged item in the array.
an object that behaves like an array. This shouldn't be modified directly. Instead, you can freely modify the data returned by the
datafunction, which should be tracked in order to benefit from this abstraction.