]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: comments
authorEvan You <yyx990803@gmail.com>
Thu, 11 Oct 2018 18:24:55 +0000 (14:24 -0400)
committerEvan You <yyx990803@gmail.com>
Thu, 11 Oct 2018 18:24:55 +0000 (14:24 -0400)
packages/core/src/componentUtils.ts

index a838f3f6735619677993fabf35fe0bd389fce14b..a902ad95908f30806ba22d596b5a6d0a5590b345 100644 (file)
@@ -26,7 +26,11 @@ export function createComponentInstance(
 ): ComponentInstance {
   // component instance creation is done in two steps.
   // first, `initializeComponentInstance` is called inside base component
-  // constructor as the instance is created so that
+  // constructor as the instance is created so that the extended component's
+  // constructor has access to certain properties and most importantly,
+  // this.$props.
+  // we are storing the vnodes in variables here so that there's no need to
+  // always pass args in super()
   currentVNode = vnode
   currentContextVNode = contextVNode
   const instance = (vnode.children = new Component()) as ComponentInstance