title: Pattern for sending events from parent to child component in Blaze
body: <p>Let's assume we have the following abstract setup:</p>
  
  <pre><code>&lt;template name="parent"&gt;
    {{&gt; child childProps}}
  &lt;/template&gt;
  </code></pre>
  
  <p>and a helper function:</p>
  
  <pre><code>Template.parent.helpers({
    childProps() {
      const instance = Template.instance();
      return {
        // whatever props we want
      };
    }
  });
  </code></pre>
  
  <p>I am wondering what's the best way to allow <code>parent</code> component to send events to it's <code>child</code> component.</p>
  
  <p>There are at least two methods I can think of:</p>
  
  <ol>
  <li><p>Don't send events and only control the child through <code>props</code>. This is probably what some people would recommend doing. The problem is that this approach requires <code>child</code> to track it's <code>Template.currentData()</code> context and react accordingly to potential changes, which makes the implementation much more complicated and error prone.</p></li>
  <li><p>Create <code>instance.emitter = new EventEmitter()</code> in the <code>onCreated</code> hook and pass it to the <code>child</code> data context, so that it can add listeners for certain events. This seems more flexible and less error prone, but still a little complicated as the child needs to properly manage listeners cleanup not only in it's lifecycle methods, e.g. <code>onDestroy</code> but also as a result  to current data context changes.</p></li>
  </ol>
  
  <p>Does anyone have other ideas how this pattern could be implemented in <code>Blaze</code>? Is there some kind of standard way of doing it, or maybe some packages that already solve this problem?</p>