File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
import React from 'react' ;
10
10
import type { Node } from 'react' ;
11
+ import NativeAnswerSolver from './js/NativeAnswerSolver' ;
11
12
import {
12
13
SafeAreaView ,
13
14
ScrollView ,
@@ -25,6 +26,7 @@ import {
25
26
LearnMoreLinks ,
26
27
ReloadInstructions ,
27
28
} from 'react-native/Libraries/NewAppScreen' ;
29
+ import Button from "react-native/Libraries/Components/Button" ;
28
30
29
31
const Section = ( { children, title} ) : Node => {
30
32
const isDarkMode = useColorScheme ( ) === 'dark' ;
@@ -59,9 +61,15 @@ const App: () => Node = () => {
59
61
backgroundColor : isDarkMode ? Colors . darker : Colors . lighter ,
60
62
} ;
61
63
64
+ const onPress = ( ) => {
65
+ const theAnswer = NativeAnswerSolver ?. answerTheUltimateQuestion ( "What's the Answer to the Ultimate Question of Life, the Universe, and Everything" ) || ""
66
+ console . log ( 'The answer is: ' + theAnswer ) ;
67
+ } ;
68
+
62
69
return (
63
70
< SafeAreaView style = { backgroundStyle } >
64
71
< StatusBar barStyle = { isDarkMode ? 'light-content' : 'dark-content' } />
72
+ < Button title = "Click to invoke your Turbo Module!" onPress = { onPress } />
65
73
< ScrollView
66
74
contentInsetAdjustmentBehavior = "automatic"
67
75
style = { backgroundStyle } >
You can’t perform that action at this time.
0 commit comments