Version
3.0.0-rc.4
Reproduction links
codesandbox
codepen
P.S. you should use the browser console
Steps to reproduce
- Create a custom directive
- Use it onto a Vue component, logging the arguments of the directive's hooks
- Expand the vnodes inside the browser console,
.component will be null
What is expected?
Is vnode.component the v3 corresponding of v2 vnode.componentInstance, isn't it?
If a custom directive is used onto a Vue component, the vnode.component shouldn't be a reference to it?
What is actually happening?
It is null 😕
Maybe is related to the fact that v3 allows more than one root node, but as you can see the problem persists when there is only one root node as well.
For the sake of completeness, here it is a codepen where v2 is used and vnode.componentInstance is what it is expected.
I don't know why, but you have to keep the codepen console open to properly see the logged vnodes inside the browser console.