-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKotlinJsiExamples.js
More file actions
65 lines (63 loc) · 1.53 KB
/
KotlinJsiExamples.js
File metadata and controls
65 lines (63 loc) · 1.53 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 {KotlinJsiTest} = global;
export const KotlinJsiExamples = () => (
<>
<Title>Kotlin JSI</Title>
<AppButton
title="kotlin jsi voidStaticMethod"
onPress={() => {
console.log(KotlinJsiTest.voidStaticMethod());
}}
/>
<AppButton
title="kotlin jsi intStaticMethod"
onPress={() => {
console.log(KotlinJsiTest.intStaticMethod());
}}
/>
<AppButton
title="kotlin jsi doubleStaticMethod"
onPress={() => {
console.log(KotlinJsiTest.doubleStaticMethod());
}}
/>
<AppButton
title="kotlin jsi voidMethod"
onPress={() => {
console.log(KotlinJsiTest.voidMethod());
}}
/>
<AppButton
title="kotlin jsi intMethod"
onPress={() => {
console.log(KotlinJsiTest.intMethod(101));
}}
/>
<AppButton
title="kotlin jsi doubleMethod"
onPress={() => {
console.log(KotlinJsiTest.doubleMethod(20.2));
}}
/>
<AppButton
title="kotlin jsi stringMethod"
onPress={() => {
console.log(KotlinJsiTest.stringMethod('kotlin string', 3));
}}
/>
<AppButton
title="kotlin jsi listString"
onPress={() => {
console.log(KotlinJsiTest.listString([5]));
}}
/>
<AppButton
title="kotlin jsi mapString"
onPress={() => {
console.log(KotlinJsiTest.mapString({size: 5}));
}}
/>
</>
);
KotlinJsiExamples.KEY = 'KotlinJsiExamples';