title: Calling one action from another action creator
body: <p>I'm working on a Redux app in which many filter components can change the nature of a search to be performed. Any time the state of one of those filter components changes, I want to re-run a search action. I can't seem to call the search action from each of the filter components correctly, however.</p>
  <p>Here's the main search action:</p>
  <pre><code>// actions/search.js
  import fetch from 'isomorphic-fetch';
  import config from '../../server/config';
  
  export const receiveSearchResults = (results) =&gt; ({
    type: 'RECEIVE_SEARCH_RESULTS', results
  })
  
  export const searchRequestFailed = () =&gt; ({
    type: 'SEARCH_REQUEST_FAILED'
  })
  
  export const fetchSearchResults = () =&gt; {
    return (dispatch, getState) =&gt; {
      // Generate the query url
      const query = getSearchQuery();  // returns a url string
      return fetch(query)
        .then(response =&gt; response.json()
          .then(json =&gt; ({
            status: response.status,
            json
          })
        ))
        .then(({ status, json }) =&gt; {
          if (status &gt;= 400) dispatch(searchRequestFailed())
          else dispatch(receiveSearchResults(json))
        }, err =&gt; { dispatch(searchRequestFailed()) })
    }
  }
  </code></pre>
  <p><code>fetchSearchResults</code> works fine when I call it from connected React components. However, I can't call that method from the following action creator (this is one of the filter action creators):</p>
  <pre><code>// actions/use-types.js
  import fetchSearchResults from './search';
  
  export const toggleUseTypes = (use) =&gt; {
    return (dispatch) =&gt; {
      dispatch({type: 'TOGGLE_USE_TYPES', use: use})
      fetchSearchResults()
    }
  }
  </code></pre>
  <p>Running this yields: <code>Uncaught TypeError: (0 , _search2.default) is not a function</code>. The same happens when I run <code>dispatch(fetchSearchResults())</code> inside <code>toggleUseTypes</code>.</p>
  <p>How can I resolve this problem and call the <code>fetchSearchResults</code> method from the <code>actions/use-types.js</code> action?</p>