Javascript – OnClick event prevent opening when closed
I got this OnClick: const [open, setOpen] = useState(true); and onClick={() => setOpen(!open != true)} Aim is to "when open then close" and "when closed then remain closed". Above works for the second part but not the first. How to…