added orai
This commit is contained in:
19
20250312/my-app/app/Counter.tsx
Normal file
19
20250312/my-app/app/Counter.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import React from "react";
|
||||
import { View, Text, Button, StyleSheet } from "react-native";
|
||||
import { CounterProvider, useCounter } from "./components/CounterContext";
|
||||
|
||||
const CounterScreen = () => {
|
||||
const {count, increment, decrement} = useCounter();
|
||||
|
||||
return (
|
||||
<View>
|
||||
<Text>
|
||||
Számláló: {count}
|
||||
</Text>
|
||||
<Button title="Növelés" onPress={increment}></Button>
|
||||
<Button title="Csökkentés" onPress={decrement}></Button>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default CounterScreen;
|
||||
Reference in New Issue
Block a user