componentWillUpdate() {
console.log('componentWillUpdate');
const {pageScroll} = this.props;
this.setState({
availableHeight: pageScroll ? document.querySelector('#page').clientHeight : findDOMNode(this) ? findDOMNode(this).clientHeight : 0
});
}
componentDidUpdate(prevProps) {
if (prevProps.someProp !== this.props.someProp) {
this.setState({ ... });
}
}