0
0
KKKhalid Khan
The useControllableState hook returns the state and function that updates the state, just like React.useState does.
With useControllableState, you can pass an initial state (using defaultValue) implying the component is uncontrolled, or you can pass a controlled value (using value) implying the component is controlled.
Library: @chakra-ui/react
Shortcut: chakra.usecontrollablestate
import { useControllableState } from '@chakra-ui/react'
const [value, setValue] = useControllableState(options)