MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / callComponentWillMount

Function callComponentWillMount

code/composition/public/app.js:8582–8601  ·  view source on GitHub ↗
(workInProgress, instance)

Source from the content-addressed store, hash-verified

8580 }
8581
8582 function callComponentWillMount(workInProgress, instance) {
8583 startPhaseTimer(workInProgress, 'componentWillMount');
8584 var oldState = instance.state;
8585
8586 if (typeof instance.componentWillMount === 'function') {
8587 instance.componentWillMount();
8588 }
8589 if (typeof instance.UNSAFE_componentWillMount === 'function') {
8590 instance.UNSAFE_componentWillMount();
8591 }
8592
8593 stopPhaseTimer();
8594
8595 if (oldState !== instance.state) {
8596 {
8597 warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component');
8598 }
8599 updater.enqueueReplaceState(instance, instance.state, null);
8600 }
8601 }
8602
8603 function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) {
8604 var oldState = instance.state;

Callers 1

mountClassInstanceFunction · 0.70

Calls 4

warningFunction · 0.85
startPhaseTimerFunction · 0.70
stopPhaseTimerFunction · 0.70
getComponentNameFunction · 0.70

Tested by

no test coverage detected