Home / Function/ UNSAFE_componentWillReceiveProps() — react Function Reference

UNSAFE_componentWillReceiveProps() — react Function Reference

Architecture documentation for the UNSAFE_componentWillReceiveProps() function in ReactCompositeComponentState-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9091a319_7a88_7361_5d53_4e5da6a4ee34["UNSAFE_componentWillReceiveProps()"]
  6a41ba62_6b34_6d3b_c13f_94f3b31fbc8c["Test"]
  9091a319_7a88_7361_5d53_4e5da6a4ee34 -->|defined in| 6a41ba62_6b34_6d3b_c13f_94f3b31fbc8c
  90cd3718_e6b6_c5bf_8a59_0884974498f6["UNSAFE_componentWillReceiveProps()"]
  90cd3718_e6b6_c5bf_8a59_0884974498f6 -->|calls| 9091a319_7a88_7361_5d53_4e5da6a4ee34
  90cd3718_e6b6_c5bf_8a59_0884974498f6["UNSAFE_componentWillReceiveProps()"]
  9091a319_7a88_7361_5d53_4e5da6a4ee34 -->|calls| 90cd3718_e6b6_c5bf_8a59_0884974498f6
  style 9091a319_7a88_7361_5d53_4e5da6a4ee34 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactCompositeComponentState-test.js lines 447–457

      UNSAFE_componentWillReceiveProps() {
        this.setState({step: 2}, () => {
          // Tests that earlier setState callbacks are not dropped
          Scheduler.log(
            `callback -- step: ${this.state.step}, extra: ${!!this.state
              .extra}`,
          );
        });
        // Treat like replaceState
        this.state = {step: 3};
      }

Domain

Subdomains

Frequently Asked Questions

What does UNSAFE_componentWillReceiveProps() do?
UNSAFE_componentWillReceiveProps() is a function in the react codebase, defined in packages/react-dom/src/__tests__/ReactCompositeComponentState-test.js.
Where is UNSAFE_componentWillReceiveProps() defined?
UNSAFE_componentWillReceiveProps() is defined in packages/react-dom/src/__tests__/ReactCompositeComponentState-test.js at line 447.
What does UNSAFE_componentWillReceiveProps() call?
UNSAFE_componentWillReceiveProps() calls 1 function(s): UNSAFE_componentWillReceiveProps.
What calls UNSAFE_componentWillReceiveProps()?
UNSAFE_componentWillReceiveProps() is called by 1 function(s): UNSAFE_componentWillReceiveProps.

Analyze Your Own Codebase

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

Try Supermodel Free