mirror of
https://github.com/maputnik/editor.git
synced 2026-02-13 16:10:01 +00:00
Removed componentWillUpdate
This commit is contained in:
@@ -17,8 +17,10 @@ class NumberInput extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
this.setState({ value: nextProps.value })
|
||||
static getDerivedStateFromProps(props, state) {
|
||||
return {
|
||||
value: props.value
|
||||
};
|
||||
}
|
||||
|
||||
changeValue(newValue) {
|
||||
|
||||
@@ -18,8 +18,10 @@ class StringInput extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
this.setState({ value: nextProps.value || '' })
|
||||
static getDerivedStateFromProps(props, state) {
|
||||
return {
|
||||
value: props.value || ''
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user