Last active
January 22, 2019 20:56
-
-
Save pictos/0cde1f52b467e772ad016e001b816954 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Objective-C | |
#import "RCTBridgeModule.h" | |
@interface MyCustomModule : NSObject <RCTBridgeModule> | |
@end | |
@implementation MyCustomModule | |
RCT_EXPORT_MODULE(); | |
// Available as NativeModules.MyCustomModule.processString | |
RCT_EXPORT_METHOD(processString:(NSString *)input callback:(RCTResponseSenderBlock)callback) | |
{ | |
callback(@[[input stringByReplacingOccurrencesOfString:@"Goodbye" withString:@"Hello"]]); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment