Home / File/ nested-cache.js — vue Source File

nested-cache.js — vue Source File

Architecture documentation for nested-cache.js, a javascript file in the vue codebase. 1 imports, 0 dependents.

File javascript VueCore VDom 1 imports 8 functions

Entity Profile

Dependency Diagram

graph LR
  a90222fa_95b9_62fb_1e75_e71bad50a1fa["nested-cache.js"]
  95f0fc43_06e0_3922_f935_20c1b9d16775["../../../../dist/vue.runtime.common.js"]
  a90222fa_95b9_62fb_1e75_e71bad50a1fa --> 95f0fc43_06e0_3922_f935_20c1b9d16775
  style a90222fa_95b9_62fb_1e75_e71bad50a1fa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import Vue from '../../../../dist/vue.runtime.common.js'

function createRegisterFn(id) {
  return function (context) {
    context = context || this.$vnode.ssrContext
    context.registered.push(id)
  }
}

function addHooks(comp) {
  const hook = createRegisterFn(comp.name)
  return Object.assign(comp, {
    _ssrRegister: hook,
    beforeCreate: hook
  })
}

const grandchild = addHooks({
  name: 'grandchild',
  props: ['id'],
  serverCacheKey: props => props.id,
  render(h) {
    return h('div', '/test')
  }
})

const child = addHooks({
  name: 'child',
  props: ['id'],
  serverCacheKey: props => props.id,
  render(h) {
    return h(grandchild, { props: { id: this.id } })
  }
})

const app = addHooks({
  name: 'app',
  props: ['id'],
  serverCacheKey: props => props.id,
  render(h) {
    return h(child, { props: { id: this.id } })
  }
})

export default () => {
  return Promise.resolve(
    new Vue({
      render: h => h(app, { props: { id: 1 } })
    })
  )
}

Domain

Subdomains

Dependencies

  • ../../../../dist/vue.runtime.common.js

Frequently Asked Questions

What does nested-cache.js do?
nested-cache.js is a source file in the vue codebase, written in javascript. It belongs to the VueCore domain, VDom subdomain.
What functions are defined in nested-cache.js?
nested-cache.js defines 8 function(s): addHooks, app.render, app.serverCacheKey, child.render, child.serverCacheKey, createRegisterFn, grandchild.render, grandchild.serverCacheKey.
What does nested-cache.js depend on?
nested-cache.js imports 1 module(s): ../../../../dist/vue.runtime.common.js.
Where is nested-cache.js in the architecture?
nested-cache.js is located at packages/server-renderer/test/fixtures/nested-cache.js (domain: VueCore, subdomain: VDom, directory: packages/server-renderer/test/fixtures).

Analyze Your Own Codebase

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

Try Supermodel Free