(workInProgress, instance)
| 8693 | } |
| 8694 | |
| 8695 | function callComponentWillMount(workInProgress, instance) { |
| 8696 | startPhaseTimer(workInProgress, 'componentWillMount'); |
| 8697 | var oldState = instance.state; |
| 8698 | |
| 8699 | if (typeof instance.componentWillMount === 'function') { |
| 8700 | instance.componentWillMount(); |
| 8701 | } |
| 8702 | if (typeof instance.UNSAFE_componentWillMount === 'function') { |
| 8703 | instance.UNSAFE_componentWillMount(); |
| 8704 | } |
| 8705 | |
| 8706 | stopPhaseTimer(); |
| 8707 | |
| 8708 | if (oldState !== instance.state) { |
| 8709 | { |
| 8710 | warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component'); |
| 8711 | } |
| 8712 | updater.enqueueReplaceState(instance, instance.state, null); |
| 8713 | } |
| 8714 | } |
| 8715 | |
| 8716 | function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) { |
| 8717 | var oldState = instance.state; |
no test coverage detected