Lifecycle

Usage of component lifecycle hooks. This example presents initialization and destroying components with hooks - beforeInit, beforeDestroy, destroy.




<strong>Counter is destroyed when count >= 5</strong>
<div class="counter"></div>
<button class="adder">+1</div>