// src/App.jsx
import { useState } from "react";
function FeedbackForm() {
const [message, setMessage] = useState("");
function handleSubmit(e) {
e.preventDefault();
console.log(message);
setMessage("");
}
return (
);
}
function App() {
return ;
}
export default App;
/*
Notes:
- The textarea is controlled exactly like a text input — value tied
to state, onChange updating it via e.target.value.
- handleSubmit reads the already-current message from state (no
separate step needed to "collect" it), then clears it by resetting
state back to an empty string after logging it.
*/