title: Why takeUntil is necessary in this ngrx example?
body: <p>In this <a href="https://github.com/ngrx/example-app/blob/master/src/app/effects/book.ts" rel="nofollow noreferrer">rxjs example</a>, a <code>takeUntil</code> is used in the <code>switchMap</code> section. I removed it and the observable works fine.</p>
  
  <p>Why the <code>takeUntil</code> and the <code>nextSearch$</code> are necessary in this <a href="https://github.com/ngrx/example-app/blob/master/src/app/effects/book.ts" rel="nofollow noreferrer">example</a>?</p>
  
  <pre><code>@Injectable()
  export class BookEffects {
  
    @Effect()
    search$: Observable&lt;Action&gt; = this.actions$
      .ofType(book.ActionTypes.SEARCH)
      .debounceTime(300)
      .map(toPayload)
      .switchMap(query =&gt; {
        if (query === '') {
          return empty();
        }
  
        const nextSearch$ = this.actions$.ofType(book.ActionTypes.SEARCH).skip(1);
  
        return this.googleBooks.searchBooks(query)
          .takeUntil(nextSearch$)
          .map(books =&gt; new book.SearchCompleteAction(books))
          .catch(() =&gt; of(new book.SearchCompleteAction([])));
      });
  
      constructor(private actions$: Actions, private googleBooks: GoogleBooksService) { }
  }
  </code></pre>