MCPcopy Create free account
hub / github.com/Lobos/react-ui / getInternalInstanceReadyForUpdate

Function getInternalInstanceReadyForUpdate

docs/lib/react.js:13460–13477  ·  view source on GitHub ↗
(publicInstance, callerName)

Source from the content-addressed store, hash-verified

13458}
13459
13460function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
13461 var internalInstance = ReactInstanceMap.get(publicInstance);
13462 if (!internalInstance) {
13463 if ("development" !== 'production') {
13464 // Only warn when we have a callerName. Otherwise we should be silent.
13465 // We're probably calling from enqueueCallback. We don't want to warn
13466 // there because we already warned for the corresponding lifecycle method.
13467 "development" !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, publicInstance.constructor.displayName) : void 0;
13468 }
13469 return null;
13470 }
13471
13472 if ("development" !== 'production') {
13473 "development" !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;
13474 }
13475
13476 return internalInstance;
13477}
13478
13479/**
13480 * ReactUpdateQueue allows for state updates to be scheduled into a later

Callers 1

react.jsFile · 0.85

Calls 1

warningFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…