title: Accessing redux store inside functions
body: <p>I would prefer to have a function exposed from a <code>.js</code> file , within that function I would prefer to have access to the variables in the store.</p>
  
  <p>Snippet of the code : -</p>
  
  <pre><code>import { connect } from 'react-redux';
  
  function log(logMessage) {
      const {environment} = this.props;
      console.debug('environment' + environment + logMessage ); 
      ....
  }
  
  function mapStateToProps(state) {
      return {
          environment : state.authReducer.environment
      };
  }
  
  export default function connect(mapStateToProps)(log);
  </code></pre>
  
  <p>I have many components, which attach the class through <code>connect</code>, can I attach functions through <code>connect()</code>?</p>