Javascript – Hook does not toggle
I have this hook that opens/closes some unique div's. I use typescript. import { SetStateAction, useState } from "react"; export default function useOpened() { const [isOpened, setIsOpened] = useState("closed"); const open = (depName: SetStateAction<string>) => setIsOpened(depName); return [isOpened, open]; }…