Advanced

Map observation

How rs-x observes Map mutations per key and emits key-scoped changes for reactive updates.

Detailed notes

  • MapObserverProxyPairFactory has priority 2 and applies to Map instances.
  • MapProxyFactory is keyed by the raw Map instance, so one observer/proxy pair is reused per map.
  • MapProxy intercepts clear, set, and delete while preserving normal method behavior for other members.
  • Each set/delete emits a change with chain context=index where index is the map key.
  • clear() emits key-by-key removals through deleteItem so downstream dependencies are updated per key.
  • Dispose unregisters the map from proxy registry.