MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / scheduleRootUpdate

Function scheduleRootUpdate

code/redux/public/app.js:14315–14341  ·  view source on GitHub ↗
(current, element, currentTime, expirationTime, callback)

Source from the content-addressed store, hash-verified

14313 }
14314
14315 function scheduleRootUpdate(current, element, currentTime, expirationTime, callback) {
14316 {
14317 if (ReactDebugCurrentFiber.phase === 'render' && ReactDebugCurrentFiber.current !== null && !didWarnAboutNestedUpdates) {
14318 didWarnAboutNestedUpdates = true;
14319 warning(false, 'Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(ReactDebugCurrentFiber.current) || 'Unknown');
14320 }
14321 }
14322
14323 callback = callback === undefined ? null : callback;
14324 {
14325 warning(callback === null || typeof callback === 'function', 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
14326 }
14327
14328 var update = {
14329 expirationTime: expirationTime,
14330 partialState: { element: element },
14331 callback: callback,
14332 isReplace: false,
14333 isForced: false,
14334 capturedValue: null,
14335 next: null
14336 };
14337 insertUpdateIntoFiber(current, update);
14338 scheduleWork(current, expirationTime);
14339
14340 return expirationTime;
14341 }
14342
14343 function updateContainerAtExpirationTime(element, container, parentComponent, currentTime, expirationTime, callback) {
14344 // TODO: If this is a nested container, this won't be the root.

Callers 1

Calls 4

warningFunction · 0.85
getComponentNameFunction · 0.70
insertUpdateIntoFiberFunction · 0.70
scheduleWorkFunction · 0.70

Tested by

no test coverage detected