Home / Function/ componentDidUpdate() — react Function Reference

componentDidUpdate() — react Function Reference

Architecture documentation for the componentDidUpdate() function in ReactIncrementalScheduling-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  4bbe3ae6_b9a4_b371_93e4_094a72413e9c["componentDidUpdate()"]
  cc31469a_2801_f839_c9fc_d1d2f1869f7a["Foo"]
  4bbe3ae6_b9a4_b371_93e4_094a72413e9c -->|defined in| cc31469a_2801_f839_c9fc_d1d2f1869f7a
  style 4bbe3ae6_b9a4_b371_93e4_094a72413e9c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/__tests__/ReactIncrementalScheduling-test.js lines 162–174

      componentDidUpdate() {
        Scheduler.log('componentDidUpdate: ' + this.state.tick);
        if (this.state.tick === 2) {
          Scheduler.log(
            'componentDidUpdate (before setState): ' + this.state.tick,
          );
          this.setState({tick: 3});
          Scheduler.log(
            'componentDidUpdate (after setState): ' + this.state.tick,
          );
          // We're in a batch. Update hasn't flushed yet.
        }
      }

Domain

Subdomains

Frequently Asked Questions

What does componentDidUpdate() do?
componentDidUpdate() is a function in the react codebase, defined in packages/react-reconciler/src/__tests__/ReactIncrementalScheduling-test.js.
Where is componentDidUpdate() defined?
componentDidUpdate() is defined in packages/react-reconciler/src/__tests__/ReactIncrementalScheduling-test.js at line 162.

Analyze Your Own Codebase

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

Try Supermodel Free