Home / Class/ ForceUpdatesOnChange Class — react Architecture

ForceUpdatesOnChange Class — react Architecture

Architecture documentation for the ForceUpdatesOnChange class in ReactUpdates-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  81b37dee_2086_d837_6a53_b16fab53dd37["ForceUpdatesOnChange"]
  e1a7562e_ea2b_594b_d7d2_0ca836dcd888["ReactUpdates-test.js"]
  81b37dee_2086_d837_6a53_b16fab53dd37 -->|defined in| e1a7562e_ea2b_594b_d7d2_0ca836dcd888
  f1273fbf_d426_8eff_7229_7c82410ce385["componentDidMount()"]
  81b37dee_2086_d837_6a53_b16fab53dd37 -->|method| f1273fbf_d426_8eff_7229_7c82410ce385
  fb4ed6f7_0297_546b_b0c7_172011d4e525["componentWillUnmount()"]
  81b37dee_2086_d837_6a53_b16fab53dd37 -->|method| fb4ed6f7_0297_546b_b0c7_172011d4e525
  e44c7451_ea3f_49a2_c31e_a346b77f013a["render()"]
  81b37dee_2086_d837_6a53_b16fab53dd37 -->|method| e44c7451_ea3f_49a2_c31e_a346b77f013a

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactUpdates-test.js lines 1268–1280

    class ForceUpdatesOnChange extends React.Component {
      componentDidMount() {
        this.onChange = () => this.forceUpdate();
        this.onChange();
        callbacks.push(this.onChange);
      }
      componentWillUnmount() {
        callbacks = callbacks.filter(c => c !== this.onChange);
      }
      render() {
        return <div key={Math.random()} onClick={function () {}} />;
      }
    }

Frequently Asked Questions

What is the ForceUpdatesOnChange class?
ForceUpdatesOnChange is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactUpdates-test.js.
Where is ForceUpdatesOnChange defined?
ForceUpdatesOnChange is defined in packages/react-dom/src/__tests__/ReactUpdates-test.js at line 1268.

Analyze Your Own Codebase

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

Try Supermodel Free