dispatchModern

open fun dispatchModern(rctEventEmitter: RCTModernEventEmitter)

Dispatch this event to JS using a V2 EventEmitter. If surfaceId is not -1 and `getEventData` is non-null, this will use the RCTModernEventEmitter API. Otherwise, it falls back to the old-style dispatch function. For Event classes that need to do something different, this method can always be overridden entirely, but it is not recommended.

This method additionally allows C++ to coalesce events and detect continuous ones for concurrent mode (Fabric only).

See also