title: React component not updating when store state has changed
body: <p>Below is my component class. The component never seems to execute componentWillUpdate(), even when I can see the state updating by logging before the return in mapStateToProps. The state is 100% changing, however the component doesn't refresh.</p>
  
  <pre><code>import React, { Component } from 'react'
  import { connect } from 'react-redux'
  import { search } from './mapActions'
  import L from 'leaflet'
  
  
  class Map extends Component {
    componentDidMount() {
      L.Icon.Default.imagePath = './images'
      this.map = new L.Map('map', {
        center: new L.LatLng(this.props.lat, this.props.lng),
        zoom: this.props.zoom,
        layers: L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
          attribution: '&lt;a href="http://osm.org/copyright"&gt;OpenStreetMap&lt;/a&gt; contributors'
        })
      })
    }
    componentWillUpdate() {
      console.log('UPDATE MAP')
      L.geoJson(this.props.data).addTo(this.map)
    }
    render() {
      return &lt;div id="map"&gt;&lt;/div&gt;
    }
  }
  
  const mapStateToProps = (state) =&gt; {
    return {
      isFetching: state.isFetching,
      data: state.data
    }
  }
  
  const mapDispatchToProps = (dispatch) =&gt; {
    return {
      search: (name) =&gt; {
        dispatch(search(name))
      }
    }
  }
  
  export default connect(
    mapStateToProps,
    mapDispatchToProps
  )(Map)
  </code></pre>
  
  <p>And here is the map reducer:</p>
  
  <pre><code>const initialState = {
    isFetching: false,
    data: {}
  }
  
  export const map = (state = initialState, action) =&gt; {
    switch(action.type) {
      case 'REQUEST_SEARCH_RESULTS':
        return Object.assign({}, state, {
          isFetching: true
        })
      case 'RECEIVE_SEARCH_RESULTS':
        return Object.assign({}, state, {
          isFetching: false,
          data: action.data
        })
      default:
        return state
    }
  }
  </code></pre>
  
  <p>After some more testing and logging it seems that when it goes to map state to props the state object it uses to map to props contains the correct data, so state.map.data is correct and I can see the return from the fetch. However when I then log this.props in componentWillUpdate(), the data object is there but empty.</p>