title: Dispatching logout from outside of a React Component
body: <p>I have a doubt with react-redux</p>
  
  <p>I'm making an app that involves authentication, and from my server, if the auth fails I send back an error.</p>
  
  <p>I made a function specifically for protected fetching, what i'd like is, if there's an error on the response, dispatch an action to log the user out, however this function isn't inside a react component and i've been told exporting the store isn't a good practice, so what's the right way to do this?</p>