title: Dependency and synchronization in Ngrx effect (API) calls
body: <p>My component needs data from the API.
  It lets the store dispatches an action, but before dispatching this action some other data needs to be obtained first. Thus, dispatched action is dependent on data that needs to be fetched before the actual action is called and the fetched data is passed to the action.</p>
  <pre><code>this.d1 = this.store.pipe(select(selectData1));
  this.d2 = this.store.pipe(select(selectData2));
  // ...
  // dispatch the actions below to and pass identifier (id) in order to get its object from the API and put the fetched data in store.
  this.store.dispatch(action1({data1Id}));
  this.store.dispatch(action1({data2Id}));
  
  // dispatch the actual action and pass this.d1 and this.d2
  this.store.dispatch(targetAction({this.d1, this.d2}));
  </code></pre>
  <p>What is the best practise for the situation described above?</p>