useControllableState

    0

    0

    Khalid Khan

    Chakra UI companion for Javascript

    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)
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.