Skip to content

RCTEventDispatcher is calling missing JS module #906

@jnhuynh

Description

@jnhuynh

React's doc for sending events to JS from native code suggests using RCTEventDispatcher's sendAppEventWithName:body method.

The problem is that RCTNativeAppEventEmitter does not exist. Not sure what the correct solution to this is. Should we create a RCTNativeAppEventEmitter module? Or should the docs suggest using sendDeviceEventWithName:body.

- (void)sendAppEventWithName:(NSString *)name body:(id)body
{
  [_bridge enqueueJSCall:@"RCTNativeAppEventEmitter.emit"
                    args:body ? @[name, body] : @[name]];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions