mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-20 05:48:44 +08:00
Fix links in docs
This commit is contained in:
@@ -97,7 +97,7 @@ CalendarManager.addEvent('Birthday Party', {
|
||||
|
||||
> **NOTE**: About array and map
|
||||
>
|
||||
> React Native doesn't provide any guarantees about the types of values in these structures. Your native module might expect array of strings, but if JavaScript calls your method with an array that contains number and string you'll get `NSArray` with `NSNumber` and `NSString`. It's developer's responsibility to check array/map values types (see [`RCTConvert`](https://github.com/facebook/react-native/blob/master/ReactKit/Base/RCTConvert.h) for helper methods).
|
||||
> React Native doesn't provide any guarantees about the types of values in these structures. Your native module might expect array of strings, but if JavaScript calls your method with an array that contains number and string you'll get `NSArray` with `NSNumber` and `NSString`. It's developer's responsibility to check array/map values types (see [`RCTConvert`](https://github.com/facebook/react-native/blob/master/React/Base/RCTConvert.h) for helper methods).
|
||||
|
||||
# Callbacks
|
||||
|
||||
@@ -128,9 +128,9 @@ CalendarManager.findEvents((error, events) => {
|
||||
})
|
||||
```
|
||||
|
||||
Native module is supposed to invoke callback only once. It can, however, store the callback as an ivar and invoke it later. This pattern is often used to wrap iOS APIs that require delegate. See [`RCTAlertManager`](https://github.com/facebook/react-native/blob/master/ReactKit/Modules/RCTAlertManager.m).
|
||||
Native module is supposed to invoke callback only once. It can, however, store the callback as an ivar and invoke it later. This pattern is often used to wrap iOS APIs that require delegate. See [`RCTAlertManager`](https://github.com/facebook/react-native/blob/master/React/Modules/RCTAlertManager.m).
|
||||
|
||||
If you want to pass error-like object to JavaScript, use `RCTMakeError` from [`RCTUtils.h`](https://github.com/facebook/react-native/blob/master/ReactKit/Base/RCTUtils.h).
|
||||
If you want to pass error-like object to JavaScript, use `RCTMakeError` from [`RCTUtils.h`](https://github.com/facebook/react-native/blob/master/React/Base/RCTUtils.h).
|
||||
|
||||
## Implementing native module
|
||||
|
||||
|
||||
Reference in New Issue
Block a user