title: Component not updating when redux store modified
body: <p>I'm using redux thunk to return an API call on an action:</p>
  
  <pre><code>export const getActiveCampaigns = () =&gt; {
  return (dispatch, getState) =&gt; {
      const bearer = 'Bearer ' + getState().login.bearer
      return axios.get(API.path + 'campaign/active/?website_id=' + getState().selectedWebsite.selectedWebsite + '&amp;' + API.beaconAPI_client, { headers: { 'Authorization': bearer } })
      .then(function (response) {
          dispatch({
              type: GET_ACTIVE_CAMPAIGNS,
              activeCampaigns: response.data.response
          })
      })
    }
  }
  </code></pre>
  
  <p>This works as in it successfully returns a list of campaigns, which I'm rendering into another component using:</p>
  
  <pre><code>class ActiveCampaignsDropdown extends Component {
      // usual stuff
  
      componentDidMount(){
          this.props.dispatch(getActiveCampaigns())
      }
  
      // render function displays campaigns using this.props.activeCampaigns
  }
  
  const mapStateToProps = (state) =&gt; {
      return {
          activeCampaigns: state.activeCampaigns.activeCampaigns
      }
  }
  </code></pre>
  
  <p>However, note <code>getState.selectedWebsite.selectedWebsite</code> on the action. This is set from an action elsewhere in the app, where a user chooses a website from a dropdown list. My reducers look like this:</p>
  
  <pre><code>export default function (state = {}, action) {
  switch(action.type){
      case SET_SELECTED_WEBSITE:
          return {
              ...state,
              selectedWebsite: action.websiteId
          }
      default:
          return state;
    }
  }
  
  export default function (state = {}, action) {
      switch(action.type){
          case GET_ACTIVE_CAMPAIGNS:
          return {
              ...state,
              activeCampaigns: action.activeCampaigns
          }
          default:
          return state;
      }
  }
  </code></pre>
  
  <p>My action for setting the selected website:</p>
  
  <pre><code>export const setSelectedWebsite = (websiteId) =&gt; {
      return {
          type: SET_SELECTED_WEBSITE,
          websiteId
      }
  }
  </code></pre>
  
  <p>This is combined with other reducers like so:</p>
  
  <pre><code>export default combineReducers({
      login,
      activeWebsites,
      activeCampaigns,
      selectedWebsite  
  })
  </code></pre>
  
  <p><strong>The problem</strong></p>
  
  <p>The contents of the active campaigns dropdown box works fine on page load - and the state tree does update - but <em>it doesn't update when the selected website changes</em>. From what I can see:</p>
  
  <ol>
  <li>I am dispatching the action correctly</li>
  <li>I am updating state, rather than mutating it</li>
  </ol>
  
  <p>I'm quite disappointed that Redux isn't "just working" in this instance, though it is possible I'm overlooking something silly having had only a few hours sleep! Any help appreciated.</p>