-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJavaJSIExamples.js
More file actions
65 lines (63 loc) · 1.48 KB
/
JavaJSIExamples.js
File metadata and controls
65 lines (63 loc) · 1.48 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import React from 'react';
import {Title, AppButton} from './components';
const {JavaJsiTest} = global;
export const JavaJSIExamples = () => (
<>
<Title>Java JSI</Title>
<AppButton
title="java jsi voidStaticMethod"
onPress={() => {
console.log(JavaJsiTest.voidStaticMethod());
}}
/>
<AppButton
title="java jsi intStaticMethod"
onPress={() => {
console.log(JavaJsiTest.intStaticMethod());
}}
/>
<AppButton
title="java jsi doubleStaticMethod"
onPress={() => {
console.log(JavaJsiTest.doubleStaticMethod());
}}
/>
<AppButton
title="java jsi voidMethod"
onPress={() => {
console.log(JavaJsiTest.voidMethod());
}}
/>
<AppButton
title="java jsi intMethod"
onPress={() => {
console.log(JavaJsiTest.intMethod(101));
}}
/>
<AppButton
title="java jsi doubleMethod"
onPress={() => {
console.log(JavaJsiTest.doubleMethod(20.2));
}}
/>
<AppButton
title="java jsi stringMethod"
onPress={() => {
console.log(JavaJsiTest.stringMethod('string', 3));
}}
/>
<AppButton
title="java jsi listString"
onPress={() => {
console.log(JavaJsiTest.listString([3]));
}}
/>
<AppButton
title="java jsi mapString"
onPress={() => {
console.log(JavaJsiTest.mapString({size: 3}));
}}
/>
</>
);
JavaJSIExamples.KEY = 'JavaJSIExamples';