(publicInstance, callerName)
| 416 | var didWarnStateUpdateForUnmountedComponent = {}; |
| 417 | |
| 418 | function warnNoop(publicInstance, callerName) { |
| 419 | { |
| 420 | var _constructor = publicInstance.constructor; |
| 421 | var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass'; |
| 422 | var warningKey = componentName + "." + callerName; |
| 423 | |
| 424 | if (didWarnStateUpdateForUnmountedComponent[warningKey]) { |
| 425 | return; |
| 426 | } |
| 427 | |
| 428 | 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); |
| 429 | |
| 430 | didWarnStateUpdateForUnmountedComponent[warningKey] = true; |
| 431 | } |
| 432 | } |
| 433 | /** |
| 434 | * This is the abstract API for an update queue. |
| 435 | */ |
no test coverage detected
searching dependent graphs…