Hex Core JS
    Preparing search index...

    Function useApplyUpdate

    • Returns an applyUpdate function by wrapping the given update function and making the resulting data available through the returned resultRef.

      Errors returned from update are returned by applyUpdate, data returned from update is assigned to the current value of resultRef.

      Type Parameters

      • FV extends FormValues
      • T

      Parameters

      • update: UpdateFunction<FV, T>

        A function that performs an update mutation and returns a response from a GraphQL API.

      Returns { applyUpdate: ApplyUpdateFunction<FV>; resultRef: RefObject<T | null> }