Toggle On Button Klik di Komponen Fungsional React JS
const [show,setShow]=useState(true)
return (
<div className="App">
{
show?<h1>Hello World !</h1>:null
}
<button onClick={()=>setShow(!show)} >Toggle</button>
</div>
);
Difficult Dove