(workInProgress, instance)
| 8580 | } |
| 8581 | |
| 8582 | function callComponentWillMount(workInProgress, instance) { |
| 8583 | startPhaseTimer(workInProgress, 'componentWillMount'); |
| 8584 | var oldState = instance.state; |
| 8585 | |
| 8586 | if (typeof instance.componentWillMount === 'function') { |
| 8587 | instance.componentWillMount(); |
| 8588 | } |
| 8589 | if (typeof instance.UNSAFE_componentWillMount === 'function') { |
| 8590 | instance.UNSAFE_componentWillMount(); |
| 8591 | } |
| 8592 | |
| 8593 | stopPhaseTimer(); |
| 8594 | |
| 8595 | if (oldState !== instance.state) { |
| 8596 | { |
| 8597 | warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component'); |
| 8598 | } |
| 8599 | updater.enqueueReplaceState(instance, instance.state, null); |
| 8600 | } |
| 8601 | } |
| 8602 | |
| 8603 | function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) { |
| 8604 | var oldState = instance.state; |
no test coverage detected