File tree Expand file tree Collapse file tree
android/src/main/java/com/awesomelibrary Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ package com.awesomelibrary
22
33import com.facebook.react.bridge.ReactApplicationContext
44
5- class AwesomeLibraryModule (reactContext : ReactApplicationContext ) :
6- NativeAwesomeLibrarySpec (reactContext) {
5+ class AwesomeLibraryModule (reactContext : ReactApplicationContext ) : NativeAwesomeLibrarySpec(reactContext) {
76
87 override fun multiply (a : Double , b : Double ): Double {
98 return a * b
Original file line number Diff line number Diff line change 11#import " AwesomeLibrary.h"
22
3+ // core implementation of the AwesomeLibrary module
34@implementation AwesomeLibrary
45- (NSNumber *)multiply : (double )a b : (double )b {
56 NSNumber *result = @(a * b);
67
78 return result;
89}
9-
10- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule :
11- (const facebook::react::ObjCTurboModule::InitParams &)params
10+ // - (return_type)functionName:(param_type)param {
11+ // // implementation of the function with retrun type and parameters
12+ // }
13+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule : (const facebook::react::ObjCTurboModule::InitParams &)params
1214{
1315 return std::make_shared<facebook::react::NativeAwesomeLibrarySpecJSI>(params);
1416}
Original file line number Diff line number Diff line change 11export { multiply } from './multiply' ;
2+ export { multiply as multiplyNative } from './multiply.native' ;
You can’t perform that action at this time.
0 commit comments