MCPcopy Create free account
hub / github.com/plotly/dash / callComponentWillMount

Function callComponentWillMount

dash/deps/react-dom@18.3.1.js:18284–18302  ·  view source on GitHub ↗
(workInProgress, instance)

Source from the content-addressed store, hash-verified

18282 }
18283
18284 function callComponentWillMount(workInProgress, instance) {
18285 var oldState = instance.state;
18286
18287 if (typeof instance.componentWillMount === 'function') {
18288 instance.componentWillMount();
18289 }
18290
18291 if (typeof instance.UNSAFE_componentWillMount === 'function') {
18292 instance.UNSAFE_componentWillMount();
18293 }
18294
18295 if (oldState !== instance.state) {
18296 {
18297 error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentNameFromFiber(workInProgress) || 'Component');
18298 }
18299
18300 classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
18301 }
18302 }
18303
18304 function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
18305 var oldState = instance.state;

Callers 1

mountClassInstanceFunction · 0.70

Calls 3

errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…