From 3cc4e230ff63b81b9e2cf5b11cb641f3d1856895 Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Thu, 10 Jul 2014 14:01:34 -0700 Subject: [PATCH] More View comments --- packages/blaze/view.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blaze/view.js b/packages/blaze/view.js index 34a4cbecb9..59976fb44e 100644 --- a/packages/blaze/view.js +++ b/packages/blaze/view.js @@ -24,7 +24,14 @@ /// callbacks are fired, which happens when the View is "used" in /// some way that requires it to be rendered. /// -/// ... +/// ...more lifecycle stuff +/// +/// `kind` is an optional string tag identifying the View. The only +/// time it's used is when looking in the View tree for a View of a +/// particular kind; for example, data contexts are stored on Views +/// of kind "with". Kinds are also useful when debugging, so in +/// general it's good for functions that create Views to set the kind. +/// Templates have kinds of the form "Template.foo". Blaze.View = function (kind, render) { if (! (this instanceof Blaze.View)) // called without `new`