import './App.css'; import { useState } from "react"; function App() { const [base, setBase] = useState(); const [height, setHeight] = useState(""); const [area, setArea] = useState(""); function calcTriangleArea() { let area = base * height / 2 setArea(area) } return (
setBase(e.target.value)} />
setHeight(e.target.value)} />
); } export default App;