Home / Function/ _flush() — vue Function Reference

_flush() — vue Function Reference

Architecture documentation for the _flush() function in template-stream.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  e3ce3bef_0e07_77f9_f5f6_bc05b5c0fad9["_flush()"]
  e403fe42_26ea_b8a9_bdf7_968ad8b3c29d["renderState()"]
  e3ce3bef_0e07_77f9_f5f6_bc05b5c0fad9 -->|calls| e403fe42_26ea_b8a9_bdf7_968ad8b3c29d
  d6d15699_35ef_8f3d_355a_501bf0e3ca26["renderScripts()"]
  e3ce3bef_0e07_77f9_f5f6_bc05b5c0fad9 -->|calls| d6d15699_35ef_8f3d_355a_501bf0e3ca26
  style e3ce3bef_0e07_77f9_f5f6_bc05b5c0fad9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/server-renderer/src/template-renderer/template-stream.ts lines 61–80

  _flush(done: Function) {
    this.emit('beforeEnd')

    if (this.inject) {
      // inline initial store state
      const state = this.renderer.renderState(this.context)
      if (state) {
        this.push(state)
      }

      // embed scripts needed
      const scripts = this.renderer.renderScripts(this.context)
      if (scripts) {
        this.push(scripts)
      }
    }

    this.push(this.template.tail(this.context))
    done()
  }

Subdomains

Frequently Asked Questions

What does _flush() do?
_flush() is a function in the vue codebase.
What does _flush() call?
_flush() calls 2 function(s): renderScripts, renderState.

Analyze Your Own Codebase

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

Try Supermodel Free