Created
June 30, 2023 02:17
-
-
Save tanner-west/44a2f83e9fe5c437c0832c36769033d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {FC} from 'react'; | |
import {Button, NativeModules, SafeAreaView} from 'react-native'; | |
const {VisionModule} = NativeModules; | |
const App: FC = () => { | |
const callback = (firstArg: any, secondArg: any) => { | |
console.log('callback args: ', firstArg, secondArg); | |
}; | |
return ( | |
<SafeAreaView> | |
<Button | |
title="Say Hello" | |
onPress={() => | |
VisionModule?.sayHello('this message is special', 1764, callback) | |
} | |
/> | |
</SafeAreaView> | |
); | |
}; | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment