next() — vue Function Reference
Architecture documentation for the next() function in render-context.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 1ffb05c8_3cc3_e1d5_cfe6_6c27dfbdebb4["next()"] dcf7cfe4_3738_9989_2f8a_38a12cfc6bf7["renderAsyncComponent()"] dcf7cfe4_3738_9989_2f8a_38a12cfc6bf7 -->|calls| 1ffb05c8_3cc3_e1d5_cfe6_6c27dfbdebb4 a1f5b8ca_b6d5_6b24_155e_038685c97c85["isUndef()"] 1ffb05c8_3cc3_e1d5_cfe6_6c27dfbdebb4 -->|calls| a1f5b8ca_b6d5_6b24_155e_038685c97c85 style 1ffb05c8_3cc3_e1d5_cfe6_6c27dfbdebb4 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