Sha256: 07dbfecf6289e39d753f165d96ba106a39d9a6df2af4e145cba6072126fd2cc7
Contents?: true
Size: 329 Bytes
Versions: 395
Compression:
Stored size: 329 Bytes
Contents
import {useState} from 'react'; const useDropdown = (initial= true) => { const [isDropDownClosed, setIsDropDownClosed] = useState(initial); const toggleDropdown = () => setIsDropDownClosed((prev) => !prev); return [ isDropDownClosed, setIsDropDownClosed as any, toggleDropdown ] } export default useDropdown
Version data entries
395 entries across 395 versions & 1 rubygems