import { StatusBar } from 'expo-status-bar'; import { Button, StyleSheet, Text, View } from 'react-native'; import { useState } from 'react'; export default function App() { let [counter, setCounter] = useState(0); let increment = () => { setCounter(counter + 1); } return ( <View style={styles.container}> <Text>Ez az első mobil appunk!</Text> <Text>A gomb ennyiszer lett megnyomva: {counter}</Text> <Button title='nyomj meg' onPress={increment}></Button> <StatusBar style="auto" /> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#FF00FF', alignItems: 'center', justifyContent: 'center', }, });