title: update state when url changes in redux-react
body: <p>I have a <code>Profile</code> component that shows user profile. On route change to <code>user/:userId</code>, the <code>userId</code> query param will be updated in <code>ownProps</code> thanks to <code>react-router-redux</code> and will then be passed into my presentation component:</p>
  
  <pre><code>const mapStateToProps = (state, ownProps) =&gt; ({
    userId: ownProps.params.userId,
    user: store.profile.user //null at first, will be updated later
  })
  </code></pre>
  
  <p>At this point, I need to fetch user profile from <code>userId</code>. Where should I do this fetching? Currently I am doing it in <code>componentDidMount</code></p>
  
  <pre><code>componentDidMount() {
    this.props.fetchProfile(this.props.userId)  //this will dispatch an action to fetch user details and store in `store.profile.user`
  }
  </code></pre>
  
  <p>The downside of this is if user goes from <code>/users/1</code> to <code>/users/2</code>, <code>componentDidMount</code> wont trigger. How should this be done?</p>