Hex Core JS
    Preparing search index...

    Function useApplyCreate

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

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

      Type Parameters

      • FV extends FormValues
      • T

      Parameters

      • create: CreateFunction<FV, T>

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

      Returns { applyCreate: ApplyCreateFunction<FV>; resultRef: RefObject<T | null> }