Update docs to clarify `RCT_REMAP_METHOD` usage.
Summary: The current docs (iOS) for promises make use of the `RCT_REMAP_METHOD` macro but it's not clear about the proper usage for the macro. Specifically, it points to a selector of `resolver:rejector:` and makes it seem like `findEvents` is assumed as both the alias and method name. This has led to some confusion (#9070) on how to use `RCT_REMAP_METHOD`. No tests needed since this is just a small docs update. Closes https://github.com/facebook/react-native/pull/13302 Differential Revision: D4831755 Pulled By: javache fbshipit-source-id: e842c16ade27088eafdac7509373cdf7780f9ece
This commit is contained in:
parent
c7387fefc8
commit
269458c613
|
@ -195,7 +195,7 @@ Refactoring the above code to use a promise instead of callbacks looks like this
|
|||
|
||||
```objective-c
|
||||
RCT_REMAP_METHOD(findEvents,
|
||||
resolver:(RCTPromiseResolveBlock)resolve
|
||||
findEventsWithResolver:(RCTPromiseResolveBlock)resolve
|
||||
rejecter:(RCTPromiseRejectBlock)reject)
|
||||
{
|
||||
NSArray *events = ...
|
||||
|
|
Loading…
Reference in New Issue