title: What is the best practice in passing responses from server calls to the component that invoked it?
body: <p>I am implementing a functionality where users can open a panel in the app which submits some data to the server. And server returns whether the data is valid or not, which should then be forwarded to the component. Currently, I do this side effect in action creator and update my Redux store to reflect the response from the server (valid or invalid, basically)</p>
  
  <p>I want the panel to auto close if the data is valid. But the issue is that Redux store could already have ‘valid’ as the API status for a previous call (which was never erased), so there is no way to tell whether this valid status is from previous submission or current submission.</p>
  
  <p>Currently, I am just dispatching an event which set the validness to pending before the each submission call to the server. And in the panel component, if <code>this.props.validness === 'pending' &amp;&amp; nextProps.validness===true</code>, I close the panel. But I fear that it is not exactly best practice to have the View depend on not just the current state, but also the previous one.</p>