(workInProgress, instance)
| 7675 | } |
| 7676 | |
| 7677 | function callComponentWillMount(workInProgress, instance) { |
| 7678 | startPhaseTimer(workInProgress, 'componentWillMount'); |
| 7679 | var oldState = instance.state; |
| 7680 | |
| 7681 | if (typeof instance.componentWillMount === 'function') { |
| 7682 | instance.componentWillMount(); |
| 7683 | } |
| 7684 | if (typeof instance.UNSAFE_componentWillMount === 'function') { |
| 7685 | instance.UNSAFE_componentWillMount(); |
| 7686 | } |
| 7687 | |
| 7688 | stopPhaseTimer(); |
| 7689 | |
| 7690 | if (oldState !== instance.state) { |
| 7691 | { |
| 7692 | warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component'); |
| 7693 | } |
| 7694 | updater.enqueueReplaceState(instance, instance.state, null); |
| 7695 | } |
| 7696 | } |
| 7697 | |
| 7698 | function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) { |
| 7699 | var oldState = instance.state; |
no test coverage detected