refactor: prefix lifecycle methods with UNSAFE_

Refs #7341
This commit is contained in:
Vladimir Gorej
2021-08-12 08:57:56 +02:00
parent a9285c5aa1
commit 8c79e2a375
18 changed files with 80 additions and 30528 deletions

View File

@@ -55,7 +55,7 @@ export default class RequestBodyEditor extends PureComponent {
}, () => this.onChange(inputValue))
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if(
this.props.value !== nextProps.value &&
nextProps.value !== this.state.value

View File

@@ -25,7 +25,7 @@ export default class Servers extends React.Component {
this.setServer(servers.first().get("url"))
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
let {
servers,
setServerVariableValue,

View File

@@ -50,7 +50,7 @@ export const makeMappedContainer = (getSystem, getStore, memGetComponent, getCom
handleProps(getSystem, mapping, props, {})
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
handleProps(getSystem, mapping, nextProps, this.props)
}
@@ -76,7 +76,7 @@ const createClass = component => class extends Component {
}
}
const Fallback = ({
const Fallback = ({
name // eslint-disable-line react/prop-types
}) => <div className="fallback">😱 <i>Could not render { name === "t" ? "this component" : name }, see the console.</i></div>