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
  bb895f18_30af_d092_3031_b8d34a0d9526["UNSAFE_componentWillReceiveProps()"]
  f7469c02_bde1_488a_78ed_08fbf0f2f95c["Component"]
  bb895f18_30af_d092_3031_b8d34a0d9526 -->|defined in| f7469c02_bde1_488a_78ed_08fbf0f2f95c
  af674510_2b8f_eafc_db8b_1c18fdb0d22e["UNSAFE_componentWillReceiveProps()"]
  bb895f18_30af_d092_3031_b8d34a0d9526 -->|calls| af674510_2b8f_eafc_db8b_1c18fdb0d22e
  style bb895f18_30af_d092_3031_b8d34a0d9526 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js lines 642–647

      UNSAFE_componentWillReceiveProps(props) {
        expect(props.update).toBe(1);
        expect(renders).toBe(1);
        this.setState({updated: true});
        expect(renders).toBe(1);
      }

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