MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / stopWorkLoopTimer

Function stopWorkLoopTimer

code/controlled-uncontrolled/public/app.js:7079–7100  ·  view source on GitHub ↗
(interruptedBy)

Source from the content-addressed store, hash-verified

7077}
7078
7079function stopWorkLoopTimer(interruptedBy) {
7080 if (enableUserTimingAPI) {
7081 if (!supportsUserTiming) {
7082 return;
7083 }
7084 var warning$$1 = null;
7085 if (interruptedBy !== null) {
7086 if (interruptedBy.tag === HostRoot) {
7087 warning$$1 = 'A top-level update interrupted the previous render';
7088 } else {
7089 var componentName = getComponentName(interruptedBy) || 'Unknown';
7090 warning$$1 = 'An update to ' + componentName + ' interrupted the previous render';
7091 }
7092 } else if (commitCountInCurrentWorkLoop > 1) {
7093 warning$$1 = 'There were cascading updates';
7094 }
7095 commitCountInCurrentWorkLoop = 0;
7096 // Pause any measurements until the next loop.
7097 pauseTimers();
7098 endMark('(React Tree Reconciliation)', '(React Tree Reconciliation)', warning$$1);
7099 }
7100}
7101
7102function startCommitTimer() {
7103 if (enableUserTimingAPI) {

Callers 1

renderRootFunction · 0.70

Calls 3

getComponentNameFunction · 0.70
pauseTimersFunction · 0.70
endMarkFunction · 0.70

Tested by

no test coverage detected