Lilact
    Preparing search index...

    Function useImperativeHandle

    • Customizes the value that is exposed to the parent when it uses a ref on a component created with forwardRef. The object returned by factory becomes the value of ref.current for object refs.

      Parameters

      • ref: Ref<any>

        The ref that was received in your component (typically via forwardRef as the second argument).

      • factory: () => any

        Function that returns the value to expose to the parent. Commonly an object with methods, or a DOM node reference.

      • Optionaldeps: any[] = undefined

        Dependency list that controls when the exposed value is recalculated.

      Returns void