Last remaining componentWillReceiveProps, whew

This commit is contained in:
James Barnsley
2020-03-12 21:32:50 +13:00
parent 29b7b65b9c
commit 28fc55bad1
18 changed files with 6810 additions and 10005 deletions

View File

@ -33,10 +33,9 @@ class EditRadio extends React.Component {
}
}
componentWillReceiveProps(nextProps) {
if (!this.props.radio && nextProps.radio) {
this.loadRadio(nextProps.radio);
}
componentDidUpdate = ({ radio: prev_radio }) => {
const { radio } = this.props;
if (!prev_radio && radio) this.loadRadio(radio);
}
loadRadio(radio) {