import { StatusBar } from 'expo-status-bar'; import { useState } from 'react'; import { StyleSheet, Text, TouchableHighlight, View } from 'react-native'; import { TextInput } from 'react-native'; import Button from './components/Button'; function calcTriangleArea(base, height) { return base * height / 2; } export default function App() { const [base, setBase] = useState(''); const [height, setHeight] = useState(''); const [area, setArea] = useState(''); function startCalc() { let result = calcTriangleArea(base, height); setArea(result); } return ( Triangle Háromszög területszámítás Alap setBase(base)} /> Magasság setHeight(height)} />