from "react"; export default function MyApp() { const [name, setName] = useState(""); const [address, setAddress] = useState(""); const handleSubmit = (orderDetails) => { setAddress("122-2222"); post("/product/" + productId + "/buy", { referrer, orderDetails, }); }; j; const visibleTodos = () => filterTodos(todos, tab); return ( <> <p>{address}</p> <Greeting name={"Yuto"} /> <button onClick={visibleTodos}>Click!!</button> <button onClick={handleSubmit}>Click!!</button> </> ); } function Greeting({ name }) { console.log("Greeting was rendered at", new Date().toLocaleTimeString()); return ( <h3> Hello{name && ", "} {name}! </h3> ); } 15