import React, { useState } from 'react';
import { View, Text, Button, NativeModules, StyleSheet } from 'react-native';
// TODO: Mock the native module here
export default function NativeModuleMockDemo() {
const [deviceInfo, setDeviceInfo] = useState('Not fetched yet');
const fetchDeviceInfo = () => {
// TODO: Call the mocked native module method and update state
};
return (
<View style={styles.container}>
<Text style={styles.title}>Native Module Mock Demo</Text>
<Text style={styles.label}>Device Info:</Text>
<Text style={styles.info}>{deviceInfo}</Text>
<Button title="Fetch Device Info" onPress={fetchDeviceInfo} />
</View>
);
}
const styles = StyleSheet.create({
container: { flex: 1, justifyContent: 'center', alignItems: 'center', padding: 20 },
title: { fontSize: 20, fontWeight: 'bold', marginBottom: 20 },
label: { fontSize: 16, marginTop: 10 },
info: { fontSize: 16, marginBottom: 20, color: 'blue' }
});