next() — vue Function Reference
Architecture documentation for the next() function in render-context.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD aa8bd4ea_fa85_d5ae_4a66_dfaa11bbbedf["next()"] c2f595b4_afdd_12e0_bb68_ce636e8e6952["renderAsyncComponent()"] c2f595b4_afdd_12e0_bb68_ce636e8e6952 -->|calls| aa8bd4ea_fa85_d5ae_4a66_dfaa11bbbedf 299f2646_f776_9b7d_1179_7b9087b1e66c["isUndef()"] aa8bd4ea_fa85_d5ae_4a66_dfaa11bbbedf -->|calls| 299f2646_f776_9b7d_1179_7b9087b1e66c style aa8bd4ea_fa85_d5ae_4a66_dfaa11bbbedf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/server-renderer/src/render-context.ts lines 71–122
next() {
// eslint-disable-next-line
while (true) {
const lastState = this.renderStates[this.renderStates.length - 1]
if (isUndef(lastState)) {
return this.done()
}
/* eslint-disable no-case-declarations */
switch (lastState.type) {
case 'Element':
case 'Fragment':
const { children, total } = lastState
const rendered = lastState.rendered++
if (rendered < total) {
return this.renderNode(children[rendered], false, this)
} else {
this.renderStates.pop()
if (lastState.type === 'Element') {
return this.write(lastState.endTag, this.next)
}
}
break
case 'Component':
this.renderStates.pop()
this.activeInstance = lastState.prevActive
break
case 'ComponentWithCache':
this.renderStates.pop()
const { buffer, bufferIndex, componentBuffer, key } = lastState
const result = {
html: buffer[bufferIndex],
components: componentBuffer[bufferIndex]
}
this.cache.set(key, result)
if (bufferIndex === 0) {
// this is a top-level cached component,
// exit caching mode.
//@ts-expect-error
this.write.caching = false
} else {
// parent component is also being cached,
// merge self into parent's result
buffer[bufferIndex - 1] += result.html
const prev = componentBuffer[bufferIndex - 1]
result.components.forEach(c => prev.add(c))
}
buffer.length = bufferIndex
componentBuffer.length = bufferIndex
break
}
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does next() do?
next() is a function in the vue codebase.
What does next() call?
next() calls 1 function(s): isUndef.
What calls next()?
next() is called by 1 function(s): renderAsyncComponent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free