renderMixin() — vue Function Reference
Architecture documentation for the renderMixin() function in render.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 70955a0b_0285_0cc3_de2f_6b5cc0bcd0dd["renderMixin()"] 59f08a0c_e006_d11f_d77f_2cadeff813b1["installRenderHelpers()"] 70955a0b_0285_0cc3_de2f_6b5cc0bcd0dd -->|calls| 59f08a0c_e006_d11f_d77f_2cadeff813b1 7f59d675_8a0c_03b6_a7a6_985942631eb0["normalizeScopedSlots()"] 70955a0b_0285_0cc3_de2f_6b5cc0bcd0dd -->|calls| 7f59d675_8a0c_03b6_a7a6_985942631eb0 223ace88_09be_39f4_db91_7d2fb7f4b084["syncSetupSlots()"] 70955a0b_0285_0cc3_de2f_6b5cc0bcd0dd -->|calls| 223ace88_09be_39f4_db91_7d2fb7f4b084 f6cc67da_03fd_cbe1_8ffb_6aaf0358d6ae["setCurrentInstance()"] 70955a0b_0285_0cc3_de2f_6b5cc0bcd0dd -->|calls| f6cc67da_03fd_cbe1_8ffb_6aaf0358d6ae 474757cc_f7dc_eabe_83a2_509534861f2f["createEmptyVNode()"] 70955a0b_0285_0cc3_de2f_6b5cc0bcd0dd -->|calls| 474757cc_f7dc_eabe_83a2_509534861f2f style 70955a0b_0285_0cc3_de2f_6b5cc0bcd0dd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/core/instance/render.ts lines 95–172
export function renderMixin(Vue: typeof Component) {
// install runtime convenience helpers
installRenderHelpers(Vue.prototype)
Vue.prototype.$nextTick = function (fn: (...args: any[]) => any) {
return nextTick(fn, this)
}
Vue.prototype._render = function (): VNode {
const vm: Component = this
const { render, _parentVnode } = vm.$options
if (_parentVnode && vm._isMounted) {
vm.$scopedSlots = normalizeScopedSlots(
vm.$parent!,
_parentVnode.data!.scopedSlots,
vm.$slots,
vm.$scopedSlots
)
if (vm._slotsProxy) {
syncSetupSlots(vm._slotsProxy, vm.$scopedSlots)
}
}
// set parent vnode. this allows render functions to have access
// to the data on the placeholder node.
vm.$vnode = _parentVnode!
// render self
const prevInst = currentInstance
const prevRenderInst = currentRenderingInstance
let vnode
try {
setCurrentInstance(vm)
currentRenderingInstance = vm
vnode = render.call(vm._renderProxy, vm.$createElement)
} catch (e: any) {
handleError(e, vm, `render`)
// return error render result,
// or previous vnode to prevent render error causing blank component
/* istanbul ignore else */
if (__DEV__ && vm.$options.renderError) {
try {
vnode = vm.$options.renderError.call(
vm._renderProxy,
vm.$createElement,
e
)
} catch (e: any) {
handleError(e, vm, `renderError`)
vnode = vm._vnode
}
} else {
vnode = vm._vnode
}
} finally {
currentRenderingInstance = prevRenderInst
setCurrentInstance(prevInst)
}
// if the returned array contains only a single node, allow it
if (isArray(vnode) && vnode.length === 1) {
vnode = vnode[0]
}
// return empty vnode in case the render function errored out
if (!(vnode instanceof VNode)) {
if (__DEV__ && isArray(vnode)) {
warn(
'Multiple root nodes returned from render function. Render function ' +
'should return a single root node.',
vm
)
}
vnode = createEmptyVNode()
}
// set parent
vnode.parent = _parentVnode
return vnode
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does renderMixin() do?
renderMixin() is a function in the vue codebase.
What does renderMixin() call?
renderMixin() calls 5 function(s): createEmptyVNode, installRenderHelpers, normalizeScopedSlots, setCurrentInstance, syncSetupSlots.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free