distinctUntilChanged
Last updated
Last updated
distinctUntilChanged(compare: function): Observable
💡 distinctUntilChanged uses ===
comparison by default, object references must match!
💡 If you want to compare based on an object property, you can use distinctUntilKeyChanged
instead!
Example 1: distinctUntilChanged with basic values
( StackBlitz )
Example 2: distinctUntilChanged with objects
( StackBlitz )
Example 3: Using custom comparer function
( StackBlitz )
distinctUntilChanged 📰 - Official docs
distinctUntilChanged - In Depth Dev Reference
Filtering operator: distinct and distinctUntilChanged 🎥 💵 - André Staltz
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/distinctUntilChanged.ts