added some examples
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import { StyleSheet, Text, View } from 'react-native';
|
||||
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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user