MCPcopy Index your code
hub / github.com/plotly/dash / warnNoop

Function warnNoop

dash/deps/react@18.2.0.js:205–219  ·  view source on GitHub ↗
(publicInstance, callerName)

Source from the content-addressed store, hash-verified

203 var didWarnStateUpdateForUnmountedComponent = {};
204
205 function warnNoop(publicInstance, callerName) {
206 {
207 var _constructor = publicInstance.constructor;
208 var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
209 var warningKey = componentName + "." + callerName;
210
211 if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
212 return;
213 }
214
215 error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
216
217 didWarnStateUpdateForUnmountedComponent[warningKey] = true;
218 }
219 }
220 /**
221 * This is the abstract API for an update queue.
222 */

Callers 1

react@18.2.0.jsFile · 0.70

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…