Comment afficher aucun en réact après le clic
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