Custom hook that creates and manages a model object for a given value.

  • Type Parameters

    • T extends {} = any

      The type of the initial value and model data.

    Parameters

    • params: IParams<T>

      The parameters for the useModel hook.

      Represents the parameters for a class.

      • Optionaldebounce?: number
      • initialValue: T | Model<T> | () => T
      • OptionalonChange?: (item: ModelAdapter<T>) => void

    Returns ModelAdapter<T>

    • The model adapter object.