Remove UNSAFE_componentWillUpdate

This commit is contained in:
pathmapper 2019-06-20 09:52:54 +02:00 committed by GitHub
parent 4e37d834ed
commit 4ba71c8bd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ class AddModal extends React.Component {
}
}
UNSAFE_componentWillUpdate(nextProps, nextState) {
shouldComponentUpdate(nextProps, nextState) {
// Check if source is valid for new type
const oldType = this.state.type;
const newType = nextState.type;
@ -75,6 +75,7 @@ class AddModal extends React.Component {
source: ""
});
}
return true;
}
getLayersForSource(source) {