Pluto

Pluto

  • Docs
  • Examples
  • Try

›Concepts

Getting Started

  • Manifesto
  • Principles

Concepts

  • Anatomy of an extension
  • Hook
  • View
  • Query
  • Event
  • Registry

Build

  • Packaging
  • Deployment
  • My first extension

Contributing

  • Development
  • Roadmap

Event

Events are exposed by the platform in the form of :events key in the capacities map. Only those events which are exposed can be either referenced by hook property (when the property is of the type :event), or used as an event handler function in view.

Event as hook property

To refer to some event via hook property (might be required for some host app hooks), the property must be defined as :event type by the app-hook and extension must correctly refer to event from capacities map.

Example

;; Capacities map in the host application
{:capacities {:events {'{store/get ...}}}}

;; Extension hook data
hooks/wallet-asset.next-coin
{:on-click [store/get]}

Event as view handler

To use some event in extension defined view, the event must be exposed via capacities map of the host platform.

Example

;; Capacities map in the host application
{:capacities {:events {'store/get ...}}}

;; Extension view data
views/coin-item
[view {}
  [input {:on-change [:store/set {:extension :input}]}]]
← PreviousNext →
  • Event as hook property
    • Example
  • Event as view handler
  • Example
Pluto
Docs
Getting StartedAPI Reference
Community
Project ChatTwitter
More
BlogGitHub
Copyright © 2018 Status.im