Jak wyświetlić brak w reakcie po kliknięciu
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