import React from 'react';
import { View, Button, Alert } from 'react-native';
export default function App() {
const showAlert = () => {
Alert.alert('Hello World');
};
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Button title="Click Here" onPress={showAlert} />
</View>
);
}
|