0
0
KKKhalid Khan
Given a prop value and state value, the useControllableProp hook is used to determine whether a component is controlled or uncontrolled, and also returns the computed value.
- It returns the prop value if the component is controlled
- It returns the state value if the component is uncontrolled
Library: @chakra-ui/react
Shortcut: chakra.usecontrollableprop
import { useControllableProp } from '@chakra-ui/react'
const [isControlled, value] = useControllableProp(propValue, stateValue)