mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-02 09:08:58 +08:00
Add import RCTBridge.h for event sending example
The example omitted the `#import "RCTBridge.h"`, which will lead to CE.
This commit is contained in:
@@ -177,6 +177,8 @@ Note that the constants are exported only at initialization time, so if you chan
|
||||
The native module can signal events to JavaScript without being invoked directly. The easiest way to do this is to use `eventDispatcher`:
|
||||
|
||||
```objective-c
|
||||
#import "RCTBridge.h"
|
||||
|
||||
- (void)calendarEventReminderReceived:(NSNotification *)notification
|
||||
{
|
||||
NSString *eventName = notification.userInfo[@"name"];
|
||||
|
||||
Reference in New Issue
Block a user