Advanced

Set observation

How rs-x tracks Set membership changes and emits updates keyed by the changed member value.

Detailed notes

  • SetObserverProxyPairFactory has priority 1 and applies to Set instances.
  • SetProxyFactory is keyed by the raw Set instance for one shared observer/proxy pair.
  • SetProxy intercepts add, delete, clear, and has; add/delete/clear produce change notifications.
  • Each emission uses the set member as the index key in the change chain.
  • Collection-item property observers can then subscribe to one member key and react when membership changes.
  • Dispose unregisters the set from proxy registry.