title: Accessing Redux state in an action creator?
body: <p>Say I have the following:</p>
  
  <pre><code>export const SOME_ACTION = 'SOME_ACTION';
  export function someAction() {
    return {
      type: SOME_ACTION,
    }
  }
  </code></pre>
  
  <p>And in that action creator, I want to access the global store state (all reducers). Is it better to do this:</p>
  
  <pre><code>import store from '../store';
  
  export const SOME_ACTION = 'SOME_ACTION';
  export function someAction() {
    return {
      type: SOME_ACTION,
      items: store.getState().otherReducer.items,
    }
  }
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>export const SOME_ACTION = 'SOME_ACTION';
  export function someAction() {
    return (dispatch, getState) =&gt; {
      const {items} = getState().otherReducer;
  
      dispatch(anotherAction(items));
    }
  }
  </code></pre>