title: Actions as callbacks in react-router routes components
body: <p>I would like to use a redux action as callback to the <code>onChange</code> event in the react-router route. I am also using the react-router-redux.</p>
  
  <p>Something like</p>
  
  <pre><code>&lt;Route path="profile/search" component={ProfileSearch} onChange={store.dispatch(fetchCompanies())} /&gt;
  </code></pre>
  
  <p>where <code>fetchCompanies</code> is the action.</p>
  
  <p>More generally, I would like the to listen to a route change and ultimately interact with the state, that is why using an action seems like the most straightforward option to me. However, I get this error:</p>
  
  <pre><code>Uncaught TypeError: hook.apply is not a function TransitionUtils.js?f913:22
  </code></pre>
  
  <p>Is there another way to achieve this? Is trying to pass an action as a callback to the route change inherently bad? If not, how can I make it work?</p>