Home / Class/ ReactDOMServerIntegrationEnvironment Class — react Architecture

ReactDOMServerIntegrationEnvironment Class — react Architecture

Architecture documentation for the ReactDOMServerIntegrationEnvironment class in ReactDOMServerIntegrationEnvironment.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  8f4d5687_6281_c4f2_b60d_720c59afd8cb["ReactDOMServerIntegrationEnvironment"]
  d082aaed_1a78_40dd_39eb_289b07a73f72["ReactDOMServerIntegrationEnvironment.js"]
  8f4d5687_6281_c4f2_b60d_720c59afd8cb -->|defined in| d082aaed_1a78_40dd_39eb_289b07a73f72
  5574e3e4_8198_00ea_f87c_657eaa2d0f03["constructor()"]
  8f4d5687_6281_c4f2_b60d_720c59afd8cb -->|method| 5574e3e4_8198_00ea_f87c_657eaa2d0f03
  069f0a7b_27a4_23c9_4274_665bc0bdc9d5["setup()"]
  8f4d5687_6281_c4f2_b60d_720c59afd8cb -->|method| 069f0a7b_27a4_23c9_4274_665bc0bdc9d5
  1aea4492_e2e9_6579_0537_2e28efa79907["teardown()"]
  8f4d5687_6281_c4f2_b60d_720c59afd8cb -->|method| 1aea4492_e2e9_6579_0537_2e28efa79907

Relationship Graph

Source Code

scripts/jest/ReactDOMServerIntegrationEnvironment.js lines 9–32

class ReactDOMServerIntegrationEnvironment extends NodeEnvironment {
  constructor(config, context) {
    super(config, context);

    this.domEnvironment = new ReactJSDOMEnvironment(config, context);

    this.global.window = this.domEnvironment.dom.window;
    this.global.document = this.global.window.document;
    this.global.navigator = this.global.window.navigator;
    this.global.Node = this.global.window.Node;
    this.global.addEventListener = this.global.window.addEventListener;
    this.global.MutationObserver = this.global.window.MutationObserver;
  }

  async setup() {
    await super.setup();
    await this.domEnvironment.setup();
  }

  async teardown() {
    await this.domEnvironment.teardown();
    await super.teardown();
  }
}

Frequently Asked Questions

What is the ReactDOMServerIntegrationEnvironment class?
ReactDOMServerIntegrationEnvironment is a class in the react codebase, defined in scripts/jest/ReactDOMServerIntegrationEnvironment.js.
Where is ReactDOMServerIntegrationEnvironment defined?
ReactDOMServerIntegrationEnvironment is defined in scripts/jest/ReactDOMServerIntegrationEnvironment.js at line 9.

Analyze Your Own Codebase

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

Try Supermodel Free