cara menampilkan tidak ada di reaksi setelah klik
import React, { useState } from "react";
export default function App() {
const [show, setShow] = useState(true);
return (
<div>
<button onClick={() => setShow((s) => !s)}>toggle</button>
<div style={{ display: show ? "block" : "none" }}>hello</div>
</div>
);
}
Plain Peacock