Inherits from NSObject
Declared in RCTEventDispatcher.h

Overview

This class wraps the [RCTBridge enqueueJSCall:args:] method, and provides some convenience methods for generating event calls.

Tasks

Other Methods

RCTScrollView Methods

Instance Methods

sendAppEventWithName:body:

- (void)sendAppEventWithName:(NSString *)name body:(id)body
Discussion

Send an application-specific event that does not relate to a specific view, e.g. a navigation or data update notification.

Declared In

RCTEventDispatcher.h

sendDeviceEventWithName:body:

- (void)sendDeviceEventWithName:(NSString *)name body:(id)body
Discussion

Send a device or iOS event that does not relate to a specific view, e.g.rotation, location, keyboard show/hide, background/awake, etc.

Declared In

RCTEventDispatcher.h

sendEvent:

- (void)sendEvent:(id<RCTEvent>)event

sendInputEventWithName:body:

- (void)sendInputEventWithName:(NSString *)name body:(NSDictionary *)body
Discussion

Send a user input event. The body dictionary must contain a “target” parameter, representing the React tag of the view sending the event

Declared In

RCTEventDispatcher.h

sendScrollEventWithType:reactTag:scrollView:userData:

- (void)sendScrollEventWithType:(RCTScrollEventType)type reactTag:(NSNumber *)reactTag scrollView:(UIScrollView *)scrollView userData:(NSDictionary *)userData
Discussion

Send a scroll event. (You can send a fake scroll event by passing nil for scrollView).

Declared In

RCTScrollView.h

sendTextEventWithType:reactTag:text:

- (void)sendTextEventWithType:(RCTTextEventType)type reactTag:(NSNumber *)reactTag text:(NSString *)text
Discussion

Send a text input/focus event.

Declared In

RCTEventDispatcher.h