(workInProgress, instance)
| 7772 | } |
| 7773 | |
| 7774 | function callComponentWillMount(workInProgress, instance) { |
| 7775 | startPhaseTimer(workInProgress, 'componentWillMount'); |
| 7776 | var oldState = instance.state; |
| 7777 | |
| 7778 | if (typeof instance.componentWillMount === 'function') { |
| 7779 | instance.componentWillMount(); |
| 7780 | } |
| 7781 | if (typeof instance.UNSAFE_componentWillMount === 'function') { |
| 7782 | instance.UNSAFE_componentWillMount(); |
| 7783 | } |
| 7784 | |
| 7785 | stopPhaseTimer(); |
| 7786 | |
| 7787 | if (oldState !== instance.state) { |
| 7788 | { |
| 7789 | warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component'); |
| 7790 | } |
| 7791 | updater.enqueueReplaceState(instance, instance.state, null); |
| 7792 | } |
| 7793 | } |
| 7794 | |
| 7795 | function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) { |
| 7796 | var oldState = instance.state; |
no test coverage detected