This repository was archived by the owner on Jul 1, 2025. It is now read-only.
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 88
99import React from 'react' ;
1010import type { Node } from 'react' ;
11+ import NativeAnswerSolver from './js/NativeAnswerSolver' ;
1112import {
1213 SafeAreaView ,
1314 ScrollView ,
@@ -25,6 +26,7 @@ import {
2526 LearnMoreLinks ,
2627 ReloadInstructions ,
2728} from 'react-native/Libraries/NewAppScreen' ;
29+ import Button from "react-native/Libraries/Components/Button" ;
2830
2931const Section = ( { children, title} ) : Node => {
3032 const isDarkMode = useColorScheme ( ) === 'dark' ;
@@ -59,9 +61,15 @@ const App: () => Node = () => {
5961 backgroundColor : isDarkMode ? Colors . darker : Colors . lighter ,
6062 } ;
6163
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+
6269 return (
6370 < SafeAreaView style = { backgroundStyle } >
6471 < StatusBar barStyle = { isDarkMode ? 'light-content' : 'dark-content' } />
72+ < Button title = "Click to invoke your Turbo Module!" onPress = { onPress } />
6573 < ScrollView
6674 contentInsetAdjustmentBehavior = "automatic"
6775 style = { backgroundStyle } >
You can’t perform that action at this time.
0 commit comments