ractivejs / ractivejs.github.io

https://ractive.js.org
8 stars 33 forks source link

Direct component communication example #145

Open ceremcem opened 6 years ago

ceremcem commented 6 years ago

Note to myself: Add the direct component communication examples:

Summary

To trigger incrementBy event inside myWidgetID instance with argument 5:

<namespace>
  <button on-click="['>>>myWidgetID', 'incrementBy', 5]">
    trigger the "incrementBy" event with argument "5" inside "myWidgetID" instance!
  </button>
  <widget wid="myWidgetID" />
</namespace>