title: Multiple actions in redux observable epic based on rules
body: <p>I realize I can emit multiple actions in <code>redux-observable</code> <code>epic</code> and have seen a few examples but I can't seem to get it right in my case.</p>
  
  <p>Basically, I want to return three actions that are NOT dependent on each other. However, each action will be based on a decision I have to make using some values in my state. So, it's something like this:</p>
  
  <pre><code>const doX = () =&gt; ({ type: types.DO_X });
  const doY = () =&gt; ({ type: types.DO_Y });
  const doZ = () =&gt; ({ type: types.DO_Z });
  const doA = () =&gt; ({ type: types.DO_A });
  const doB = () =&gt; ({ type: types.DO_B });
  const doC = () =&gt; ({ type: types.DO_C });
  
  export const myEpic = (action$, state$) =&gt; action$.pipe (
     ofType(types.SOMETHING_HAS_HAPPENED)
     mergeMap(action =&gt; Observable.of(
        const value1 = state$.value.module1.value;
        if(value1 &gt; 10) {
            doX();
        } else {
            doY();
        },
        // Second action
        const value2 = state$.value.module2.value;
        if(value2) {
           doA();
        } else {
           doB();
        },
        // Third action -- similar idea here
     )
  );
  </code></pre>
  
  <p>It's the block of business logic where it's not working. Also, I think I'm supposed to use <code>mergeMap</code> in this case but not 100% certain.</p>
  
  <p>In this simple case, I could've easily done <code>if(state$.value.module1.value &gt; 10)</code> but there are cases in my app where it's more readible for me to assign those values to local variables because I'm dealing with multiple values. So, it would be nice to create a nice block of code where I can clearly lay out my business logic.</p>
  
  <p>How do I handle this?</p>