BACK
ReferencedistinctUntilKeyChanged
Reference · 58

distinctUntilKeyChanged

distinctUntilKeyChanged

rxjs.dev

DistinctUntilChanged on a single object field.

Signature

distinctUntilKeyChanged(key: K): MonoTypeOperatorFunction

What it does

Compares the given field of the current and previous value. If the field is unchanged, the object is dropped.

When to use

Streams of state objects: emit changes only when status, id, query, or route key changed.

See also

distinctUntilChanged, distinct

script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...