mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-03 22:43:35 +08:00
Don't encourage the use of internal modules
This commit is contained in:
@@ -50,7 +50,7 @@ RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location)
|
||||
Now, from your JavaScript file you can call the method like this:
|
||||
|
||||
```javascript
|
||||
var CalendarManager = require('NativeModules').CalendarManager;
|
||||
var CalendarManager = require('react-native').NativeModules.CalendarManager;
|
||||
CalendarManager.addEvent('Birthday Party', '4 Privet Drive, Surrey');
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user