Parcourir la source

comments for flow type nodes

Evan You il y a 9 ans
Parent
commit
a7965292f4
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      flow/component.js

+ 2 - 2
flow/component.js

@@ -27,7 +27,7 @@ declare interface Component {
   $refs: { [key: string]: Component | Element | Array<Component | Element> | void };
   $slots: { [key: string]: Array<VNode> };
   $scopedSlots: { [key: string]: () => VNodeChildren };
-  $vnode: VNode;
+  $vnode: VNode; // the placeholder node for the component in parent's render tree
   $isServer: boolean;
   $props: Object;
 
@@ -63,7 +63,7 @@ declare interface Component {
   _isMounted: boolean;
   _isDestroyed: boolean;
   _isBeingDestroyed: boolean;
-  _vnode: ?VNode;
+  _vnode: ?VNode; // self root node
   _staticTrees: ?Array<VNode>;
   _hasHookEvent: boolean;
   _provided: ?Object;