(publicInstance, callerName)
| 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 | */ |
no test coverage detected
searching dependent graphs…