(workInProgress, instance)
| 7803 | } |
| 7804 | |
| 7805 | function callComponentWillMount(workInProgress, instance) { |
| 7806 | startPhaseTimer(workInProgress, 'componentWillMount'); |
| 7807 | var oldState = instance.state; |
| 7808 | |
| 7809 | if (typeof instance.componentWillMount === 'function') { |
| 7810 | instance.componentWillMount(); |
| 7811 | } |
| 7812 | if (typeof instance.UNSAFE_componentWillMount === 'function') { |
| 7813 | instance.UNSAFE_componentWillMount(); |
| 7814 | } |
| 7815 | |
| 7816 | stopPhaseTimer(); |
| 7817 | |
| 7818 | if (oldState !== instance.state) { |
| 7819 | { |
| 7820 | warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component'); |
| 7821 | } |
| 7822 | updater.enqueueReplaceState(instance, instance.state, null); |
| 7823 | } |
| 7824 | } |
| 7825 | |
| 7826 | function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) { |
| 7827 | var oldState = instance.state; |
no test coverage detected