Home / Function/ UNSAFE_componentWillReceiveProps() — react Function Reference

UNSAFE_componentWillReceiveProps() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  ff022758_0cbc_e494_57e4_c14d9ac5ed55["UNSAFE_componentWillReceiveProps()"]
  330b38b4_95bb_ec05_5b5d_0e308d57a682["ChildWithContext"]
  ff022758_0cbc_e494_57e4_c14d9ac5ed55 -->|defined in| 330b38b4_95bb_ec05_5b5d_0e308d57a682
  35f4a521_4d3e_7ae2_079b_31827498dba4["UNSAFE_componentWillReceiveProps()"]
  ff022758_0cbc_e494_57e4_c14d9ac5ed55 -->|calls| 35f4a521_4d3e_7ae2_079b_31827498dba4
  style ff022758_0cbc_e494_57e4_c14d9ac5ed55 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js lines 543–553

      UNSAFE_componentWillReceiveProps(nextProps, nextContext) {
        expect('foo' in nextContext).toBe(true);

        if (nextProps !== this.props) {
          propChanges++;
        }

        if (nextContext !== this.context) {
          contextChanges++;
        }
      }

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__/ReactLegacyCompositeComponent-test.js.
Where is UNSAFE_componentWillReceiveProps() defined?
UNSAFE_componentWillReceiveProps() is defined in packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js at line 543.
What does UNSAFE_componentWillReceiveProps() call?
UNSAFE_componentWillReceiveProps() calls 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