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

Function callComponentWillMount

code/redux/public/app.js:8695–8714  ·  view source on GitHub ↗
(workInProgress, instance)

Source from the content-addressed store, hash-verified

8693 }
8694
8695 function callComponentWillMount(workInProgress, instance) {
8696 startPhaseTimer(workInProgress, 'componentWillMount');
8697 var oldState = instance.state;
8698
8699 if (typeof instance.componentWillMount === 'function') {
8700 instance.componentWillMount();
8701 }
8702 if (typeof instance.UNSAFE_componentWillMount === 'function') {
8703 instance.UNSAFE_componentWillMount();
8704 }
8705
8706 stopPhaseTimer();
8707
8708 if (oldState !== instance.state) {
8709 {
8710 warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress) || 'Component');
8711 }
8712 updater.enqueueReplaceState(instance, instance.state, null);
8713 }
8714 }
8715
8716 function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) {
8717 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