(workInProgress, instance)
| 8442 | } |
| 8443 | |
| 8444 | function callComponentWillMount(workInProgress, instance) { |
| 8445 | startPhaseTimer(workInProgress, 'componentWillMount'); |
| 8446 | var oldState = instance.state; |
| 8447 | |
| 8448 | if (typeof instance.componentWillMount === 'function') { |
| 8449 | instance.componentWillMount(); |
| 8450 | } |
| 8451 | if (typeof instance.UNSAFE_componentWillMount === 'function') { |
| 8452 | instance.UNSAFE_componentWillMount(); |
| 8453 | } |
| 8454 | |
| 8455 | stopPhaseTimer(); |
| 8456 | |
| 8457 | if (oldState !== instance.state) { |
| 8458 | { |
| 8459 | warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component'); |
| 8460 | } |
| 8461 | updater.enqueueReplaceState(instance, instance.state, null); |
| 8462 | } |
| 8463 | } |
| 8464 | |
| 8465 | function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) { |
| 8466 | var oldState = instance.state; |
no test coverage detected