title: Redux: form submission callback
body: <p>Basically I want to show message to user after he successfully submitted form. Like <code>Thanks. Product added</code>. And after few seconds I want this message to disappear.</p>
  
  <p>Currently my code is pretty straightforward and contains 3 action types for AJAX request (<code>ADD_PRODUCT_REQUEST</code>, <code>ADD_PRODUCT_SUCCESS</code>, <code>ADD_PRODUCT_FAILURE</code>).  </p>
  
  <p>My component containing form connected to redux via <code>mapDispatchToProps</code>:</p>
  
  <pre><code>import {addProduct} from '../actions/product';
  
  const mapDispatchToProps = dispatch =&gt; ({
      onSubmit(productName) {
          dispatch(addProduct(productName))
      }
  });
  class AddProduct extends React.Component {
      addProduct() {
          const {onSubmit} = this.props; 
          onSubmit(this.productNameInput.val);
      }
  
      render() {
         return (
            &lt;form onSubmit={::this.addProduct}&gt;...&lt;/form&gt;
         )
      }
  }
  </code></pre>
  
  <p>And my action creator is also pretty straightforward (pseudocode): </p>
  
  <pre><code>export const addProduct = (name) =&gt; dispatch =&gt; {
      dispatch(addProductRequest())
      fetch(...).then(addProductSuccess()).catch(e =&gt; addProductFailure(error))     
  }
  </code></pre>
  
  <p>How I can using this "standard" react-redux architecture know that AJAX request executed successfully on component side? </p>
  
  <p>I have only 1 idea - add some value to state informing that product was added, like <code>added:true</code>, but I think it's bad idea. </p>