title: How to dispatch actions in any function such as error handler?
body: <p>I do have so many axios calls for which i have written the error handling codes in the respective catch blocks, but what i need is to define a generic error handler for all the error in a separate file and also to dispatch the actions as per the error in order to change the store state. </p>
  
  <p>I have tried to dispatch the action but dispatch is not binded as in action creators we bind it manually but here i haven't binded in with dispatch anywhere</p>
  
  <pre><code>handleErrors: () =&gt; dispatch =&gt; {
          alert("error function called");
          dispatch({type: "HELLO"});
      } 
  </code></pre>
  
  <p>I want to use dispatch in this function that is not connected to redux</p>