Skip to content

Instantly share code, notes, and snippets.

@rt2zz
Created January 8, 2016 18:30
Show Gist options
  • Save rt2zz/7795c6894b6d3e2af367 to your computer and use it in GitHub Desktop.
Save rt2zz/7795c6894b6d3e2af367 to your computer and use it in GitHub Desktop.
#import "RCTEventDispatcher.h"
#import "RCTRootView.h"
// somewhere in application:didFinishLaunchingWithOptions:(
self.bridge = rootView.bridge;
// sometime later
[self.bridge.eventDispatcher sendAppEventWithName:@"backgroundPositionResponse" body:JSON];
import { NativeAppEventEmitter } from 'react-native'
NativeAppEventEmitter.addListener('backgroundPositionResponse', (data) => {
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment