Match-id-a915f78dcc8ebc19fdc1e4577d27d7bd4cd75d4a
This commit is contained in:
parent
6775fcd4a0
commit
c6c4ec9caa
|
@ -118,15 +118,19 @@ export function callComponentWillUpdate(inst, newProps, newState, nextContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function callComponentWillReceiveProps(inst, newProps: object, newContext: object) {
|
export function callComponentWillReceiveProps(inst, newProps: object, newContext: object) {
|
||||||
const oldState = inst.state;
|
|
||||||
if (inst.componentWillReceiveProps) {
|
if (inst.componentWillReceiveProps) {
|
||||||
|
const oldState = inst.state;
|
||||||
inst.componentWillReceiveProps(newProps, newContext);
|
inst.componentWillReceiveProps(newProps, newContext);
|
||||||
|
if (inst.state !== oldState) {
|
||||||
|
changeStateContent.call(inst, UpdateState.Override, inst.state, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (inst.UNSAFE_componentWillReceiveProps) {
|
if (inst.UNSAFE_componentWillReceiveProps) {
|
||||||
|
const oldState = inst.state;
|
||||||
inst.UNSAFE_componentWillReceiveProps(newProps, newContext);
|
inst.UNSAFE_componentWillReceiveProps(newProps, newContext);
|
||||||
}
|
if (inst.state !== oldState) {
|
||||||
if (inst.state !== oldState) {
|
changeStateContent.call(inst, UpdateState.Override, inst.state, null);
|
||||||
changeStateContent.call(inst, UpdateState.Override, inst.state, null);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue