title: Why do we need `ngDoCheck`
body: <p>I can't seem to figure out why I need <code>ngDoCheck</code> lifecycle hook other than for simple notification, particularly how writing code inside of it makes a difference as regard to change detection. Most of the examples I've found show useless examples, like <a href="https://juristr.com/blog/2016/04/angular2-change-detection/" rel="nofollow noreferrer">this one</a>, with a bunch of logging functionality.</p>
  <p>Also, in the generated classes I don't see it being used for something else other than simple notification:</p>
  <p><strong><code>conmponent/wrapper.ngfactory.js</code></strong></p>
  <pre class="lang-js prettyprint-override"><code>Wrapper_AppComponent.prototype.ngDoCheck = function(view,el,throwOnChange) {
    var self = this;
    var changed = self._changed;
    self._changed = false;
    if (!throwOnChange) {
      if (changed) {
        jit_setBindingDebugInfoForChanges1(view.renderer,el,self._changes);
        self._changes = {};
      }
      self.context.ngDoCheck(); &lt;----------- this calls ngDoCheck on the component
                                                 but the result is not used 
                                                 anywhere and no params are passed
    }
    return changed;
  };
  </code></pre>