Function useGetter

  • When you have a form and a bunch of handlers, instead of closing over all the values and recreating the handlers too often, pass the form state to this hook to get a referentially stable getter function. Then call this getter in your handlers.

    Type Parameters

    • Value

    Parameters

    • value: Value

      whatever value you want

    Returns (() => Value)

    stable reference to a function that will return the value

      • (): Value
      • Returns Value

Generated using TypeDoc