on<P extends dynamic> method

void on<P extends dynamic>(
  1. Enum eventName,
  2. CallbackEvent<T, P> callback
)

Puts on to listen eventName event.

When the event is emitted, the callback is called.

Implementation

void on<P extends dynamic>(Enum eventName, CallbackEvent<T, P> callback) {
  Reactter.on<T, P>(_instanceReceived, eventName, callback);
}