ripe / / Observable / bindAsync


fun bindAsync(event: String, callback: ObservableCallback): ObservableCallback

Binds to an event by providing a block that will receive the event payload as a parameter and return a Deferred that will be completed asynchronously.


event - Name of the event to bind to.

callback - Block to be executed when the event is triggered.

Returns the provided callback, to be used when unbinding from the event.