(workInProgress, instance)
| 13077 | } |
| 13078 | |
| 13079 | function callComponentWillMount(workInProgress, instance) { |
| 13080 | startPhaseTimer(workInProgress, 'componentWillMount'); |
| 13081 | var oldState = instance.state; |
| 13082 | |
| 13083 | if (typeof instance.componentWillMount === 'function') { |
| 13084 | instance.componentWillMount(); |
| 13085 | } |
| 13086 | |
| 13087 | if (typeof instance.UNSAFE_componentWillMount === 'function') { |
| 13088 | instance.UNSAFE_componentWillMount(); |
| 13089 | } |
| 13090 | |
| 13091 | stopPhaseTimer(); |
| 13092 | |
| 13093 | if (oldState !== instance.state) { |
| 13094 | { |
| 13095 | error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component'); |
| 13096 | } |
| 13097 | |
| 13098 | classComponentUpdater.enqueueReplaceState(instance, instance.state, null); |
| 13099 | } |
| 13100 | } |
| 13101 | |
| 13102 | function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) { |
| 13103 | var oldState = instance.state; |
no test coverage detected