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

Function callComponentWillMount

code/new-context-api/public/app.js:7805–7824  ·  view source on GitHub ↗
(workInProgress, instance)

Source from the content-addressed store, hash-verified

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;

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