2.0+
Bond Live Events
Live components
Live bond components are components that are re-rendered back into a page when an live activity or a trigger event occurs. The easiest way declare a bond component as live component is by the use of live event triggers. These event triggers define an activity which must occur before a template is re-rendered back to the page. The following are lists of live event triggers:

bond:load This attribute is used to declare that an activity must be called as soon as the page loads. This also means that a request will be sent immediately a page is loaded.
bond:click This attribute declares that an activity must be called only when an element is clicked upon.
bond:mouseover This attribute declares that an activity must be called only when an element is hovered upon. This may generated a continuous request.
bond:keypress This attribute declares that an activity must be called only when a key is pressed down while on an input field.
The addition of any of these live events attributes into a bond component element will render such element as a live component trigger.

Working with triggers
We can initialize an onload event using the bond:load directive in the bond component

  bond('Posts')
                              
  <?php
  
  namespace spoova/mi/windows/Bond;

  use spoova/mi/core/classes/Bond;

  class Posts extends Bond{

    public function render(): Compiler|String {

      return compile('bond-template');

    }

    public function activity() {

      //do something

    }

  }  
                              
  <div>

    <button bond:load="activity"> Run Activity <button>
  
  </div>
                              
In the example above, when the button which is initially rendered to bond('Posts') loads, a request is immediately forwarded which calls the activity() method of the component controller. Once the activity is executed, then the live component is re-rendered back to the page. Any method can be called in this way but the method must not be a private, protected or static method. All other event attributes can be used similarly to trigger the re-rendering of a bond componenet.