Advanced

Array observation

How rs-x instruments arrays with a proxy that intercepts mutations and emits index-based changes.

Detailed notes

  • ArrayObserverProxyPairFactory has priority 5 and applies to Array targets.
  • ObjectObserverProxyPairFactoryProvider sorts factories by priority, so array handling is selected before promise/observable/map/set.
  • ArrayProxyFactory is keyed by the raw array instance, so repeated observation requests reuse one proxy+observer pair.
  • ArrayProxy intercepts push, splice, pop, shift, unshift, reverse, sort, fill, direct index writes, and length shrink.
  • Each changed slot emits an IPropertyChange with chain context=index for precise downstream updates.
  • Dispose unregisters the raw array from proxy registry and releases proxy references.