title: How to wait for dispatch to be completed before selecting from a store. Ngrx related issue
body: <p>How can I wait for a dispatch to be completed before I select from a store. Do not have any luck in Googling? In this case, how do I wait for the dispatch to be done first before selecting from store?</p>
  
  <p>My codes, appreciate the help supported.</p>
  
  <pre><code>**team-list.component.ts**
  
   teamsState: Observable&lt;{teams: Team[]}&gt;;
  
    constructor(private store: Store&lt;fromApp.AppState&gt;) { }
  
    ngOnInit() {
      this.store.dispatch(new TeamActions.GetTeams({
        search: this.search,
        limit: this.limit,
        skip: this.skip,
        sortBy: this.sortBy
      }));
      this.teamsState = this.store.select('teams');
    }
  </code></pre>
  
  <pre><code>**team-list.component.html**
  
  &lt;mat-expansion-panel
      *ngFor="let team of (teamsState | async).teams; let i = index"&gt;
      &lt;mat-expansion-panel-header&gt;
        &lt;div class="container-fluid"&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-md-1"&gt;{‌{ i+1 }}&lt;/div&gt;
            &lt;div class="col-md-1"&gt;
                &lt;div class="post-image"&gt;
                  &lt;img [src]="imageUrl+team.imagePath" [alt]="team.name" style&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-md-10"&gt; {‌{ team.name }} &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/mat-expansion-panel-header&gt;
  </code></pre>
  
  <pre><code>effects
  @Effect() // If you do not want to dispatch any actions, if need to modify store state then remove
      teamList = this.actions$.pipe(
          ofType(TeamActions.GET_TEAMS),
              map((action: TeamActions.GetTeams) =&gt; {
                return action.payload;
              }),
              switchMap((params: {search: string, limit: number, skip: number, sortBy: string}) =&gt; {
                  return this.httpClient.get&lt;Team[]&gt;(
                    `${BACKEND_URL}?search=${params.search}&amp;&amp;limit=${params.limit}&amp;&amp;skip=${params.skip}&amp;&amp;sortBy=${params.sortBy}`);
              }),
              map((teams: Team[]) =&gt; {
                  return {
                      type: TeamActions.SET_TEAMS,
                      payload: teams
                  };
              }),
              catchError((err, caught) =&gt; {
                // console.log(err.error.errors);
                this.snackBarService.showSnackBar('Unable to Get Teams', true);
                return caught;
              })
          );
  </code></pre>
  
  <p>Currently during first load, the dispatching action is not completed yet and when i select item from store. It is currently empty.</p>