distinctUntilChanged operator

Updated May 6, 2026

Short answer

It filters out consecutive duplicate values.

Deep explanation

Prevents unnecessary emissions in streams.

Real-world example

Avoid redundant UI updates.

Common mistakes

  • Expecting global deduplication.

Follow-up questions

  • Does it remove all duplicates?
  • Can it use custom comparator?

More Reactive Programming interview questions

View all →