title: ComponentDidMount not getting called after redux state update?
body: <p>I think I'm missing a concept here about React and Redux. I'm trying to work with objects stored in redux, and I'm having trouble.</p>
  
  <p>REDUX:
  I have an action fetchItems, that gets all items from the database. This action works successfully. </p>
  
  <p>REACT:
  I have a container, UserProfile, that calls fetchItems in componentDidMount. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>class UserProfile extends Component {
  
    componentWillMount() {
      console.log('------------ USER PROFILE -------------------');
    }
  
    componentDidMount() {
      console.log('[ComponentDidMount]: Items: ', this.props.items);
      this.props.fetchItems();
    }
  
    render() {
      let profile = null;
      console.log('[Render]: Items: ', this.props.items);
  
      return &lt;Auxillary&gt;{profile}&lt;/Auxillary&gt;;
    }
  }
  
  const mapStateToProps = state =&gt; {
    return {
      items: state.items.items
    };
  };
  
  const mapDispatchToProps = dispatch =&gt; {
    return {
      fetchItems: () =&gt; dispatch(actions.fetchItems())
    };
  };
  
  export default connect(mapStateToProps, mapDispatchToProps)(UserProfile);</code></pre>
  </div>
  </div>
  </p>
  
  <p>The problem I'm seeing is that this.props.items is always null (even though fetchItems is successful). The only way I can detect that items were stored in redux store is if I use componentWillRecieveProps(nextProps). Here, I successfully see the items in nextProps. I feel like using componentWillReceiveProps might be too "messy" though. I guess what I'm asking is, what is the standard way of dealing with updates to redux states in react?</p>
  
  <p>Aseel</p>