title: tap() vs subscribe() to set a class property
body: <p>I am very new to rxjs and was just wondering is it ok to setup a class property by piping the stream and tapping it, or it should i do it in the subscribe. To me either way works, just wonder if it is ok to do it as I see fit to my eyes or there is something I am unaware of.</p>
  
  <p>Typescript code demonstrating both ways:</p>
  
  <pre><code>export class ViewComponent implements OnInit {
  
    applicant = {};
  
    constructor(public route: ActivatedRoute, private store: Store&lt;any&gt;) {}
  
    ngOnInit() {
      this.route.paramMap.pipe(
        switchMap(params =&gt; this.store.select(state =&gt; state.applicants.entities[params.get('id')])),
        tap(applicant =&gt; this.applicant = applicant)
      ).subscribe();
    }
  }
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>export class ViewComponent implements OnInit {
  
    applicant = {};
  
    constructor(public route: ActivatedRoute, private store: Store&lt;any&gt;) {}
  
    ngOnInit() {
      this.route.paramMap.pipe(
        switchMap(params =&gt; this.store.select(state =&gt; state.applicants.entities[params.get('id')]))
      ).subscribe(applicant =&gt; this.applicant = applicant);
    }
  }
  </code></pre>