title: ngrx - createSelector vs Observable.combineLatest
body: <p>I just ran into the <a href="https://github.com/ngrx/platform/blob/master/docs/store/selectors.md" rel="noreferrer">custom selectors</a> of <code>@ngrx</code> and I simply cannot be amazed by the feature.</p>
  
  <p>Following their use case of <code>books</code> for the <code>selectedUser</code>, I can't give a real good reason to use a custom selector such as :</p>
  
  <pre><code>export const selectVisibleBooks = createSelector(selectUser, selectAllBooks, (selectedUser: User, allBooks: Books[]) =&gt; {
      return allBooks.filter((book: Book) =&gt; book.userId === selectedUser.id);
  });
  </code></pre>
  
  <p>instead of something like :</p>
  
  <pre><code>export const selectVisibleBooks = Observable.combineLatest(selectUser, selectAllBooks, (selectedUser: User, allBooks: Books[]) =&gt; {
      return allBooks.filter((book: Book) =&gt; book.userId === selectedUser.id);
  });
  </code></pre>
  
  <p>I tried to convince myself that the <a href="https://en.wikipedia.org/wiki/Memoization" rel="noreferrer">memoization</a> of the <code>createSelector</code> is the crucial part, but as far as I understood, it cannot perform these performance boosts to non-primitive values, so it wont really save any computing for non primitive slices, which by using <code>Rx</code>'s <a href="http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#instance-method-distinctUntilChanged" rel="noreferrer"><code>distinctUntilChanged</code></a> operator  with the <code>combineLatest</code> can be solved.</p>
  
  <p>So what have I missed, why should I use <code>@ngrx/selector</code>?</p>
  
  <p>Thanks in advance for any insights.</p>