SSR issue: hoisted vnode subtrees not getting hydrated causes HMR to fail
Version
3.2.11
Reproduction link
Steps to reproduce
See linked README
What is expected?
Should not error
What is actually happening?
Errors
If I disable the server render, the patching works fine. Otherwise, the vnodes under thead
have null
el
.
So it seems like patchElement
fails because vnode.el
is null
because hydrateElement
stops recursing at table
because it is hoisted (so children vnodes do not get el
associated). Not sure what the problem is yet but just documenting my findings.
Since the table vnode is hoisted, the patchFlag
is -1 which means children do not get hydrated. I'm guessing the table is incorrectly being hoisted?
Maybe the hoisting makes sense... but why does it not hydrate under hoisted? at the very least the elements should be hooked up even if things are static under there?