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

Function scheduleRootUpdate

code/composition/public/app.js:14202–14228  ·  view source on GitHub ↗
(current, element, currentTime, expirationTime, callback)

Source from the content-addressed store, hash-verified

14200 }
14201
14202 function scheduleRootUpdate(current, element, currentTime, expirationTime, callback) {
14203 {
14204 if (ReactDebugCurrentFiber.phase === 'render' && ReactDebugCurrentFiber.current !== null && !didWarnAboutNestedUpdates) {
14205 didWarnAboutNestedUpdates = true;
14206 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');
14207 }
14208 }
14209
14210 callback = callback === undefined ? null : callback;
14211 {
14212 warning(callback === null || typeof callback === 'function', 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
14213 }
14214
14215 var update = {
14216 expirationTime: expirationTime,
14217 partialState: { element: element },
14218 callback: callback,
14219 isReplace: false,
14220 isForced: false,
14221 capturedValue: null,
14222 next: null
14223 };
14224 insertUpdateIntoFiber(current, update);
14225 scheduleWork(current, expirationTime);
14226
14227 return expirationTime;
14228 }
14229
14230 function updateContainerAtExpirationTime(element, container, parentComponent, currentTime, expirationTime, callback) {
14231 // 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