your recipe card header background

    useControllableProp

    0

    0

    Khalid Khan

    Chakra UI companion for Javascript

    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)
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.