title: How do you dispatch multiple Actions from an Effect in Ngrx
body: <p>I'm following the basic effect pattern of Ngrx using datapersistence.pessimisticUpdate() for a post to the server like so. </p>
  
  <pre><code>@Effect()
  myUpdateCompleted$ = this.dataPersistence.pessimisticUpdate(MyActions.UpdateData, {
  
      run: (action: UpdateData, state: MyDataPartialState) =&gt; {
          return this.myDataService.updateData(action.payload)
              .pipe(
                  map(result =&gt; ({
                      type: MyActions.ReloadData,
                      payload: result,
                  })
                  )
              );
      },
  
      onError: (action: UpdateData, error) =&gt; {
          console.error('Error', error);
          return new HandleUpdateDataError(error);
      }
  });
  </code></pre>
  
  <p>I'd like to reload data after that update is done. However, before I reload the data I'd like to notify the user that the update finished and now a data reload is executing. My intended approach was to dispatch two actions after the update finishes. One action to notify the user (dispatch MyActions.NotifyMessage) and another to reload the data (dispatch MyActions.ReloadData). However, the datapersistence methods only allow for a single action to be returned and no provision for an array of actions to be dispatched. I've tried the solution posted on this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/50685981/dispatch-multiple-ordered-actions-from-effect-in-ngrx">Dispatch multiple, ordered, actions from effect in NGRX</a></p>
  
  <p>But I get the error:</p>
  
  <pre><code>Property 'payload' does not exist on type 'Action' 
  </code></pre>
  
  <p>How do I go about doing this? Should I dump the use of the datapersistence functions and return multiple actions in some other way? If so, how can I do that within an Ngrx Effect? Any help would be highly appreciated.</p>