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
  4a9cec62_e190_4988_d5c9_262fa740c4f9["UNSAFE_componentWillReceiveProps()"]
  be9c55e8_d846_4cb7_3e36_37181e722927["GrandChild"]
  4a9cec62_e190_4988_d5c9_262fa740c4f9 -->|defined in| be9c55e8_d846_4cb7_3e36_37181e722927
  35f4a521_4d3e_7ae2_079b_31827498dba4["UNSAFE_componentWillReceiveProps()"]
  4a9cec62_e190_4988_d5c9_262fa740c4f9 -->|calls| 35f4a521_4d3e_7ae2_079b_31827498dba4
  style 4a9cec62_e190_4988_d5c9_262fa740c4f9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js lines 521–531

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