componentWillReceiveProps(nextProps) {
    if (nextProps.selectedDate !== this.props.selectedDate) {
      this.setState({date: this.asLuxon(nextProps.selectedDate)})
    }
  }
/**
   * Update state when props change. In particular, if we receive a different
   * `selectedDate` prop from up the hierarchy, set state.date to a new Luxon
   * DateTime appropriately (in order to force the calendar to focus on the new
   * date).
   * @param {*} nextProps - the next props
   * @return {void}
   */
Update state when props change. In particular, if we receive a different
`selectedDate` prop from up the hierarchy, set state.date to a new Luxon
DateTime appropriately (in order to force the calendar to focus on the new
date).
@param {*} nextProps - the next props
@return {void}
Update state when props change . In particular if we receive a different ` selectedDate ` prop from up the hierarchy set state . date to a new Luxon DateTime appropriately ( in order to force the calendar to focus on the new date ) . @param { * } nextProps - the next props @return { void }
componentWillReceiveProps(nextProps) {
    if (nextProps.selectedDate !== this.props.selectedDate) {
      this.setState({date: this.asLuxon(nextProps.selectedDate)})
    }
  }
componentWillReceiveProps ( nextProps ) { if ( nextProps . selectedDate !== this . props . selectedDate ) { this . setState ( { date : this . asLuxon ( nextProps . selectedDate ) } ) } }
Update state when props change.
Update state when props change .