mirror of
https://github.com/maputnik/editor.git
synced 2025-12-27 00:20:00 +00:00
Removed componentWillUpdate
This commit is contained in:
@@ -29,10 +29,10 @@ class JSONEditor extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
this.setState({
|
||||
code: JSON.stringify(nextProps.layer, null, 2)
|
||||
})
|
||||
static getDerivedStateFromProps(props, state) {
|
||||
return {
|
||||
code: JSON.stringify(props.layer, null, 2)
|
||||
};
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
|
||||
Reference in New Issue
Block a user