(current, element, currentTime, expirationTime, callback)
| 14097 | } |
| 14098 | |
| 14099 | function scheduleRootUpdate(current, element, currentTime, expirationTime, callback) { |
| 14100 | { |
| 14101 | if (ReactDebugCurrentFiber.phase === 'render' && ReactDebugCurrentFiber.current !== null && !didWarnAboutNestedUpdates) { |
| 14102 | didWarnAboutNestedUpdates = true; |
| 14103 | 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'); |
| 14104 | } |
| 14105 | } |
| 14106 | |
| 14107 | callback = callback === undefined ? null : callback; |
| 14108 | { |
| 14109 | warning(callback === null || typeof callback === 'function', 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback); |
| 14110 | } |
| 14111 | |
| 14112 | var update = { |
| 14113 | expirationTime: expirationTime, |
| 14114 | partialState: { element: element }, |
| 14115 | callback: callback, |
| 14116 | isReplace: false, |
| 14117 | isForced: false, |
| 14118 | capturedValue: null, |
| 14119 | next: null |
| 14120 | }; |
| 14121 | insertUpdateIntoFiber(current, update); |
| 14122 | scheduleWork(current, expirationTime); |
| 14123 | |
| 14124 | return expirationTime; |
| 14125 | } |
| 14126 | |
| 14127 | function updateContainerAtExpirationTime(element, container, parentComponent, currentTime, expirationTime, callback) { |
| 14128 | // TODO: If this is a nested container, this won't be the root. |
no test coverage detected