(workInProgress, instance)
| 8477 | } |
| 8478 | |
| 8479 | function callComponentWillMount(workInProgress, instance) { |
| 8480 | startPhaseTimer(workInProgress, 'componentWillMount'); |
| 8481 | var oldState = instance.state; |
| 8482 | |
| 8483 | if (typeof instance.componentWillMount === 'function') { |
| 8484 | instance.componentWillMount(); |
| 8485 | } |
| 8486 | if (typeof instance.UNSAFE_componentWillMount === 'function') { |
| 8487 | instance.UNSAFE_componentWillMount(); |
| 8488 | } |
| 8489 | |
| 8490 | stopPhaseTimer(); |
| 8491 | |
| 8492 | if (oldState !== instance.state) { |
| 8493 | { |
| 8494 | warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component'); |
| 8495 | } |
| 8496 | updater.enqueueReplaceState(instance, instance.state, null); |
| 8497 | } |
| 8498 | } |
| 8499 | |
| 8500 | function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) { |
| 8501 | var oldState = instance.state; |
no test coverage detected