wip(ssr): adjust event hydration flag
This commit is contained in:
@@ -58,8 +58,11 @@ export function renderComponentRoot(
|
||||
}
|
||||
try {
|
||||
if (vnode.shapeFlag & ShapeFlags.STATEFUL_COMPONENT) {
|
||||
// withProxy is a proxy with a diffrent `has` trap only for
|
||||
// runtime-compiled render functions using `with` block.
|
||||
const proxyToUse = withProxy || proxy
|
||||
result = normalizeVNode(
|
||||
instance.render!.call(withProxy || proxy, proxy, renderCache)
|
||||
instance.render!.call(proxyToUse, proxyToUse, renderCache)
|
||||
)
|
||||
} else {
|
||||
// functional
|
||||
|
||||
@@ -279,10 +279,9 @@ export function createVNode(
|
||||
shouldTrack > 0 &&
|
||||
currentBlock !== null &&
|
||||
// the EVENTS flag is only for hydration and if it is the only flag, the
|
||||
// vnode should not be considered dynamic.
|
||||
// vnode should not be considered dynamic due to handler caching.
|
||||
patchFlag !== PatchFlags.HYDRATE_EVENTS &&
|
||||
(patchFlag > 0 ||
|
||||
patchFlag === PatchFlags.NEED_PATCH ||
|
||||
shapeFlag & ShapeFlags.SUSPENSE ||
|
||||
shapeFlag & ShapeFlags.STATEFUL_COMPONENT ||
|
||||
shapeFlag & ShapeFlags.FUNCTIONAL_COMPONENT)
|
||||
|
||||
Reference in New Issue
Block a user