Skip to content

Commit a0cf888

Browse files
committed
[TurboModule] Implement the generated native spec interface
1 parent ba3f2a4 commit a0cf888

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.rnnewarchitectureapp.modules;
2+
3+
import androidx.annotation.NonNull;
4+
5+
import com.facebook.react.bridge.ReactApplicationContext;
6+
import com.rnnewarchitectureapp.codegen.NativeAnswerSolverSpec;
7+
8+
public class NativeAnswerSolver extends NativeAnswerSolverSpec {
9+
10+
public static final String NAME = "NativeAnswerSolver";
11+
12+
public NativeAnswerSolver(ReactApplicationContext reactContext) {
13+
super(reactContext);
14+
}
15+
16+
@Override
17+
public double answerTheUltimateQuestion(String input) {
18+
return 42.0;
19+
}
20+
21+
@NonNull
22+
@Override
23+
public String getName() {
24+
return NAME;
25+
}
26+
}

0 commit comments

Comments
 (0)