Home / Function/ resetOwnerStackLimit() — react Function Reference

resetOwnerStackLimit() — react Function Reference

Architecture documentation for the resetOwnerStackLimit() function in ReactOwnerStackReset.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  01edd8fd_3560_748f_3174_d8e7ffd87ebe["resetOwnerStackLimit()"]
  34486a0a_16ea_d79d_a759_4489503ba160["ReactOwnerStackReset.js"]
  01edd8fd_3560_748f_3174_d8e7ffd87ebe -->|defined in| 34486a0a_16ea_d79d_a759_4489503ba160
  b1f2eb9f_c625_71aa_34c2_4b3190667159["getCurrentTime()"]
  01edd8fd_3560_748f_3174_d8e7ffd87ebe -->|calls| b1f2eb9f_c625_71aa_34c2_4b3190667159
  style 01edd8fd_3560_748f_3174_d8e7ffd87ebe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shared/ReactOwnerStackReset.js lines 27–42

export function resetOwnerStackLimit() {
  if (__DEV__) {
    const now = getCurrentTime();
    const timeSinceLastReset = now - lastResetTime;
    if (timeSinceLastReset > 1000) {
      ReactSharedInternals.recentlyCreatedOwnerStacks = 0;
      lastResetTime = now;
    }
  } else {
    // These errors should never make it into a build so we don't need to encode them in codes.json
    // eslint-disable-next-line react-internal/prod-error-codes
    throw new Error(
      'resetOwnerStackLimit should never be called in production mode. This is a bug in React.',
    );
  }
}

Domain

Subdomains

Frequently Asked Questions

What does resetOwnerStackLimit() do?
resetOwnerStackLimit() is a function in the react codebase, defined in packages/shared/ReactOwnerStackReset.js.
Where is resetOwnerStackLimit() defined?
resetOwnerStackLimit() is defined in packages/shared/ReactOwnerStackReset.js at line 27.
What does resetOwnerStackLimit() call?
resetOwnerStackLimit() calls 1 function(s): getCurrentTime.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free