6 Matching Annotations
  1. Oct 2020
    1. this.txtQueryChanged .debounceTime(1000) // wait 1 sec after the last event before emitting last event .distinctUntilChanged() // only emit if value is different from previous value .subscribe(model => { this.txtQuery = model;
    1. With Angular 2 we can debounce using RxJS operator debounceTime() on a form control's valueChanges observable:

      What's the React/Svelte equiv. pattern for this?

    1. Indeed, this simple contract is very close to that of an ob­serv­able, such as those provided by Rxjs. set is basically equiv­a­lent to next in the ob­serv­able world.
    2. I would prefer the BehaviorSubject , which allows us to kick off with an initial value.
  2. Sep 2020
    1. For interoperability with RxJS Observables, the .subscribe method is also allowed to return an object with an .unsubscribe method, rather than return the unsubscription function directly.