0
1
KKKhalid Khan
useBoolean is a custom hook used to manage a boolean value with on, off and toggle functions.
The useBoolean hook returns a stateful boolean value. This code snippet is used to initiate a UseBoolean function.
Library: @chakra-ui/react
Shortcut: chakra.useBoolean
import { useBoolean } from '@chakra-ui/react'
const [parameter, setsetParameter = useBoolean() // setParameter should be in camelCase.