react-native-bt-device/example/src/App.tsx

34 lines
721 B
TypeScript
Raw Normal View History

2024-03-24 09:45:44 +00:00
import * as React from 'react';
import { StyleSheet, View, Text } from 'react-native';
2024-04-29 10:57:13 +00:00
import RNMethodModule,{DYGlucoseDriver} from 'react-native-bt-device';
2024-03-24 09:45:44 +00:00
export default function App() {
// const [result, setResult] = React.useState<number | undefined>();
2024-04-29 10:57:13 +00:00
React.useEffect( () => {
RNMethodModule.connectSingleDevice('abc')
DYGlucoseDriver.startMonitor('abc')
2024-03-24 09:45:44 +00:00
// 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,
},
});