Home / Class/ DrainWritable Class — react Architecture

DrainWritable Class — react Architecture

Architecture documentation for the DrainWritable class in ReactDOMServerIntegrationTestUtils.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  5d0b056a_13e6_cf90_e5df_a5e22494b542["DrainWritable"]
  b5d06153_dcd4_9917_8ab5_8f4ccf09455a["ReactDOMServerIntegrationTestUtils.js"]
  5d0b056a_13e6_cf90_e5df_a5e22494b542 -->|defined in| b5d06153_dcd4_9917_8ab5_8f4ccf09455a
  7e54494f_ebd1_99d9_3584_b3cf126e1c82["constructor()"]
  5d0b056a_13e6_cf90_e5df_a5e22494b542 -->|method| 7e54494f_ebd1_99d9_3584_b3cf126e1c82
  8555564d_9ae0_f176_9061_248dc1ce8ba1["_write()"]
  5d0b056a_13e6_cf90_e5df_a5e22494b542 -->|method| 8555564d_9ae0_f176_9061_248dc1ce8ba1

Relationship Graph

Source Code

packages/react-dom/src/__tests__/utils/ReactDOMServerIntegrationTestUtils.js lines 158–168

  class DrainWritable extends stream.Writable {
    constructor(options) {
      super(options);
      this.buffer = '';
    }

    _write(chunk, encoding, cb) {
      this.buffer += chunk;
      cb();
    }
  }

Frequently Asked Questions

What is the DrainWritable class?
DrainWritable is a class in the react codebase, defined in packages/react-dom/src/__tests__/utils/ReactDOMServerIntegrationTestUtils.js.
Where is DrainWritable defined?
DrainWritable is defined in packages/react-dom/src/__tests__/utils/ReactDOMServerIntegrationTestUtils.js at line 158.

Analyze Your Own Codebase

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

Try Supermodel Free