next() — vue Function Reference
Architecture documentation for the next() function in render-context.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 0548b39e_7a1b_1094_08ee_75e092985e56["next()"] 1f378302_3376_98d6_8ce8_9b6280a10bfa["RenderContext"] 0548b39e_7a1b_1094_08ee_75e092985e56 -->|defined in| 1f378302_3376_98d6_8ce8_9b6280a10bfa e37a9278_38b9_9843_639b_2e03afcc6e0c["renderAsyncComponent()"] e37a9278_38b9_9843_639b_2e03afcc6e0c -->|calls| 0548b39e_7a1b_1094_08ee_75e092985e56 style 0548b39e_7a1b_1094_08ee_75e092985e56 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
Called By
Source
Frequently Asked Questions
What does next() do?
next() is a function in the vue codebase, defined in packages/server-renderer/src/render-context.ts.
Where is next() defined?
next() is defined in packages/server-renderer/src/render-context.ts at line 71.
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