-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathRNLibModule.java
More file actions
31 lines (24 loc) · 809 Bytes
/
RNLibModule.java
File metadata and controls
31 lines (24 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.reactlibrary;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.Callback;
import java.util.HashMap;
import java.util.Map;
public class RNLibModule extends ReactContextBaseJavaModule {
private final ReactApplicationContext reactContext;
public RNLibModule(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;
}
@Override
public Map<String, Object> getConstants() {
final Map<String, Object> constants = new HashMap<>();
constants.put("textFromLib", "This text comes from the lib.");
return constants;
}
@Override
public String getName() {
return "RNLib";
}
}