Home / Function/ renderStatic() — vue Function Reference

renderStatic() — vue Function Reference

Architecture documentation for the renderStatic() function in render-static.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  73dbdcd9_0842_794b_02e4_3b03dbaf33ca["renderStatic()"]
  7c4a1871_a8e0_6bbc_abc1_336b9a233c19["render-static.ts"]
  73dbdcd9_0842_794b_02e4_3b03dbaf33ca -->|defined in| 7c4a1871_a8e0_6bbc_abc1_336b9a233c19
  88e95f1b_cf66_5e7b_e7c6_1a76a7e1416e["markStatic()"]
  73dbdcd9_0842_794b_02e4_3b03dbaf33ca -->|calls| 88e95f1b_cf66_5e7b_e7c6_1a76a7e1416e
  style 73dbdcd9_0842_794b_02e4_3b03dbaf33ca fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/instance/render-helpers/render-static.ts lines 7–26

export function renderStatic(
  index: number,
  isInFor: boolean
): VNode | Array<VNode> {
  const cached = this._staticTrees || (this._staticTrees = [])
  let tree = cached[index]
  // if has already-rendered static tree and not inside v-for,
  // we can reuse the same tree.
  if (tree && !isInFor) {
    return tree
  }
  // otherwise, render a fresh tree.
  tree = cached[index] = this.$options.staticRenderFns[index].call(
    this._renderProxy,
    this._c,
    this // for render fns generated for functional component templates
  )
  markStatic(tree, `__static__${index}`, false)
  return tree
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does renderStatic() do?
renderStatic() is a function in the vue codebase, defined in src/core/instance/render-helpers/render-static.ts.
Where is renderStatic() defined?
renderStatic() is defined in src/core/instance/render-helpers/render-static.ts at line 7.
What does renderStatic() call?
renderStatic() calls 1 function(s): markStatic.

Analyze Your Own Codebase

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

Try Supermodel Free