MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / callComponentWillMount

Function callComponentWillMount

code/event-handlers/public/app.js:7774–7793  ·  view source on GitHub ↗
(workInProgress, instance)

Source from the content-addressed store, hash-verified

7772 }
7773
7774 function callComponentWillMount(workInProgress, instance) {
7775 startPhaseTimer(workInProgress, 'componentWillMount');
7776 var oldState = instance.state;
7777
7778 if (typeof instance.componentWillMount === 'function') {
7779 instance.componentWillMount();
7780 }
7781 if (typeof instance.UNSAFE_componentWillMount === 'function') {
7782 instance.UNSAFE_componentWillMount();
7783 }
7784
7785 stopPhaseTimer();
7786
7787 if (oldState !== instance.state) {
7788 {
7789 warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component');
7790 }
7791 updater.enqueueReplaceState(instance, instance.state, null);
7792 }
7793 }
7794
7795 function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) {
7796 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