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
  2c6d1300_cc6c_7898_43c3_97e005c7cf2f["UNSAFE_componentWillReceiveProps()"]
  c44db6ab_f085_09eb_dff4_08344ddce51b["ChildWithoutContext"]
  2c6d1300_cc6c_7898_43c3_97e005c7cf2f -->|defined in| c44db6ab_f085_09eb_dff4_08344ddce51b
  35f4a521_4d3e_7ae2_079b_31827498dba4["UNSAFE_componentWillReceiveProps()"]
  2c6d1300_cc6c_7898_43c3_97e005c7cf2f -->|calls| 35f4a521_4d3e_7ae2_079b_31827498dba4
  style 2c6d1300_cc6c_7898_43c3_97e005c7cf2f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js lines 561–571

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

        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 561.
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