title: How can I display a modal dialog in Redux that performs asynchronous actions?
body: <p>I'm building an app that needs to show a confirm dialog in some situations.</p>
  
  <p>Let's say I want to remove something, then I'll dispatch an action like <code>deleteSomething(id)</code> so some reducer will catch that event and will fill the dialog reducer in order to show it.</p>
  
  <p>My doubt comes when this dialog submits.</p>
  
  <ul>
  <li>How can this component dispatch the proper action according to the first action dispatched?</li>
  <li>Should the action creator handle this logic?</li>
  <li>Can we add actions inside the reducer?</li>
  </ul>
  
  <p>edit:</p>
  
  <p>to make it clearer:</p>
  
  <pre><code>deleteThingA(id) =&gt; show dialog with Questions =&gt; deleteThingARemotely(id)
  
  createThingB(id) =&gt; Show dialog with Questions =&gt; createThingBRemotely(id)
  </code></pre>
  
  <p>So I'm trying to reuse the dialog component. Showing/hiding the dialog it's not the problem as this can be easily done in the reducer. What I'm trying to specify is how to dispatch the action from the right side according to the action that starts the flow in the left side.</p>