title: How to get return from dispatch() in react-redux?
body: <p><strong>Store</strong></p>
  <pre><code>reducers: {
   updateProduct: (state, action) =&gt; {
    let { id } = action.payload;
    .....
    .....
    .....
    }
  }
  </code></pre>
  <p><strong>Dispatching from a function in component</strong></p>
  <pre><code>let dispatch = useDispatch();
  dispatch({ type: 'products/updateProduct' });
  </code></pre>
  <p><strong>How can I know that product is updated successfully</strong></p>
  <p><strong>I want something like this</strong></p>
  <pre><code>reducers: {
   updateProduct: (state, action) =&gt; {
    let { id } = action.payload;
    .....
    .....
    return true;
    }
  }
  =============
  let dispatch = useDispatch();
  let status = dispatch({ type: 'products/updateProduct' });
  if(status){
   alert()
  }
  </code></pre>