33 lines
650 B
TypeScript
33 lines
650 B
TypeScript
|
|
import * as React from 'react';
|
||
|
|
|
||
|
|
import { StyleSheet, View, Text } from 'react-native';
|
||
|
|
import RNMethodModule from 'react-native-bt-device';
|
||
|
|
|
||
|
|
export default function App() {
|
||
|
|
// const [result, setResult] = React.useState<number | undefined>();
|
||
|
|
|
||
|
|
React.useEffect(() => {
|
||
|
|
RNMethodModule.startBLEScan()
|
||
|
|
// multiply(3, 7).then(setResult);
|
||
|
|
}, []);
|
||
|
|
|
||
|
|
return (
|
||
|
|
<View style={styles.container}>
|
||
|
|
<Text>Result: {}</Text>
|
||
|
|
</View>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
const styles = StyleSheet.create({
|
||
|
|
container: {
|
||
|
|
flex: 1,
|
||
|
|
alignItems: 'center',
|
||
|
|
justifyContent: 'center',
|
||
|
|
},
|
||
|
|
box: {
|
||
|
|
width: 60,
|
||
|
|
height: 60,
|
||
|
|
marginVertical: 20,
|
||
|
|
},
|
||
|
|
});
|