(workInProgress, instance)
| 16637 | } |
| 16638 | |
| 16639 | function callComponentWillMount(workInProgress, instance) { |
| 16640 | startPhaseTimer(workInProgress, 'componentWillMount'); |
| 16641 | var oldState = instance.state; |
| 16642 | |
| 16643 | if (typeof instance.componentWillMount === 'function') { |
| 16644 | instance.componentWillMount(); |
| 16645 | } |
| 16646 | |
| 16647 | if (typeof instance.UNSAFE_componentWillMount === 'function') { |
| 16648 | instance.UNSAFE_componentWillMount(); |
| 16649 | } |
| 16650 | |
| 16651 | stopPhaseTimer(); |
| 16652 | |
| 16653 | if (oldState !== instance.state) { |
| 16654 | { |
| 16655 | error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component'); |
| 16656 | } |
| 16657 | |
| 16658 | classComponentUpdater.enqueueReplaceState(instance, instance.state, null); |
| 16659 | } |
| 16660 | } |
| 16661 | |
| 16662 | function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) { |
| 16663 | var oldState = instance.state; |
no test coverage detected