MCPcopy
hub / github.com/facebook/react / resetOwnerStackLimit

Function resetOwnerStackLimit

packages/shared/ReactOwnerStackReset.js:27–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27export function resetOwnerStackLimit() {
28 if (__DEV__) {
29 const now = getCurrentTime();
30 const timeSinceLastReset = now - lastResetTime;
31 if (timeSinceLastReset > 1000) {
32 ReactSharedInternals.recentlyCreatedOwnerStacks = 0;
33 lastResetTime = now;
34 }
35 } else {
36 // These errors should never make it into a build so we don't need to encode them in codes.json
37 // eslint-disable-next-line react-internal/prod-error-codes
38 throw new Error(
39 'resetOwnerStackLimit should never be called in production mode. This is a bug in React.',
40 );
41 }
42}

Callers 5

createRequestFunction · 0.90
resumeRequestFunction · 0.90
createRequestFunction · 0.90
createPrerenderRequestFunction · 0.90
prepareFreshStackFunction · 0.90

Calls 1

getCurrentTimeFunction · 0.50

Tested by

no test coverage detected