@adobe/data - v0.10.30
    Preparing search index...

    Function fromKeys

    • Reactive keyed collection. Given an observable list of keys and a function that maps each key to an observe function for that key's value, yields an observe function of the per-key values in key order.

      Per-key value subscriptions are keyed by === identity and REUSED across list changes: when the key list changes, only added keys subscribe a value and only removed keys unsubscribe one — keys that remain are untouched. So a change in one key's value re-emits only that key's slot (every other key keeps its current value), without re-running or re-subscribing the rest.

      A result is only produced once every current key has yielded a value; if every value observe function yields synchronously on subscribe, the first result is produced synchronously. Re-emits whenever the key list changes or any live value yields.

      This is the dynamic, keyed counterpart to fromArray / fromProperties (which combine a fixed set of observe functions): here the set of value observe functions is itself driven by an observe function of keys.

      Type Parameters

      • K
      • V

      Parameters

      • keys: Observe<readonly K[]>

        an observe function of the current key list (duplicate keys collapse)

      • observeValue: (key: K) => Observe<V>

        maps a key to the observe function for that key's value

      Returns Observe<readonly V[]>