componentWillReceiveProps(nextProps) {
    // Previous props can be accessed by this.props
    // Calling setState here does not trigger an an additional re-render
    console.log('componentWillReceiveProps');
  }
// Not called for the initial render
Not called for the initial render
Not called for the initial render
componentWillReceiveProps(nextProps) {
    console.log('componentWillReceiveProps');
  }
componentWillReceiveProps ( nextProps ) { console . log ( 'componentWillReceiveProps' ) ; }
Not called for the initial render
Not called for the initial render
// Previous props can be accessed by this.props // Calling setState here does not trigger an an additional re-render