title: Access Redux store outside React when using next-redux-wrapper
body: <p>I have a NextJS React app that uses the next-react-wrapper (basically a HOC) on <code>_app.tsx</code> like so:</p>
  
  <p><strong>_app.tsx</strong></p>
  
  <pre><code>...
  import withRedux from 'next-redux-wrapper';
  
  class Page extends App&lt;Props&gt; {
    ...
  }
  
  export default withRedux(reduxStore)(Page);
  </code></pre>
  
  <p><strong>store.ts</strong></p>
  
  <pre><code>import { applyMiddleware, createStore } from 'redux';
  import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly';
  
  import rootReducer from './reducer';
  
  export default (
    initialState: any = undefined,
  ) =&gt; createStore(
    rootReducer,
    initialState,
    composeWithDevTools(applyMiddleware()),
  );
  </code></pre>
  
  <p>I'm struggling to work out how to access the store outside of React such as in a simple helper function. My <code>store.ts</code> file exports a <code>makeStore</code> function which is needed (including the initial state) for the next-redux-wrapper HOC.</p>
  
  <p>I could access the store in a React component and pass it to my helper functions as an argument each time but that seems messy.</p>
  
  <p>Is there a way to access the store direct from non React helper function modules?</p>