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