Class Formeum<Values, ExtraContext>

Generate a typed formeum object context, hooks and components

Type Parameters

  • Values extends BaseValues

  • ExtraContext extends Record<string, unknown> = Record<never, never>

Hierarchy

  • Formeum

Constructors

  • Type Parameters

    • Values extends BaseValues

    • ExtraContext extends Record<string, unknown> = Record<never, never>

    Parameters

    • extraContextDefault: ExtraContext

    Returns Formeum<Values, ExtraContext>

Properties

#cache: Partial<Record<keyof Formeum<Values, Record<never, never>>, any>> = {}
#extraContextDefault: ExtraContext

Accessors

  • get FormCallbacks(): ((props: FormCallbacksProps<Values, ExtraContext>) => ReactElement<any, string | JSXElementConstructor<any>>)
  • Returns ((props: FormCallbacksProps<Values, ExtraContext>) => ReactElement<any, string | JSXElementConstructor<any>>)

      • (props: FormCallbacksProps<Values, ExtraContext>): ReactElement<any, string | JSXElementConstructor<any>>
      • Get all form handler functions.

        Returns

        Parameters

        Returns ReactElement<any, string | JSXElementConstructor<any>>

  • get FormHTMLCheckbox(): (<Name>(props: FormHTMLCheckboxProps<Values, Name>) => ReactElement<any, string | JSXElementConstructor<any>>)
  • Returns (<Name>(props: FormHTMLCheckboxProps<Values, Name>) => ReactElement<any, string | JSXElementConstructor<any>>)

      • <Name>(props: FormHTMLCheckboxProps<Values, Name>): ReactElement<any, string | JSXElementConstructor<any>>
      • Get the props for a HTML checkbox.

        Returns

        Type Parameters

        • Name extends string

        Parameters

        Returns ReactElement<any, string | JSXElementConstructor<any>>

  • get FormHTMLInput(): (<Name>(props: FormHTMLInputProps<Values, Name>) => ReactElement<any, string | JSXElementConstructor<any>>)
  • Returns (<Name>(props: FormHTMLInputProps<Values, Name>) => ReactElement<any, string | JSXElementConstructor<any>>)

      • <Name>(props: FormHTMLInputProps<Values, Name>): ReactElement<any, string | JSXElementConstructor<any>>
      • Get the props for a HTML input.

        Returns

        Type Parameters

        • Name extends string

        Parameters

        Returns ReactElement<any, string | JSXElementConstructor<any>>

  • get FormHandler(): ((props: FormHandlerProps<Values>) => ReactElement<any, string | JSXElementConstructor<any>>)
  • Returns ((props: FormHandlerProps<Values>) => ReactElement<any, string | JSXElementConstructor<any>>)

      • (props: FormHandlerProps<Values>): ReactElement<any, string | JSXElementConstructor<any>>
      • Get the form handler using the hook useFormHandler and render the context provider.

        Returns

        Parameters

        Returns ReactElement<any, string | JSXElementConstructor<any>>

  • get FormReactInput(): (<Name>(props: FormReactInputProps<Values, Name>) => ReactElement<any, string | JSXElementConstructor<any>>)
  • Returns (<Name>(props: FormReactInputProps<Values, Name>) => ReactElement<any, string | JSXElementConstructor<any>>)

      • <Name>(props: FormReactInputProps<Values, Name>): ReactElement<any, string | JSXElementConstructor<any>>
      • Get the props for a React input.

        Returns

        Type Parameters

        • Name extends string

        Parameters

        Returns ReactElement<any, string | JSXElementConstructor<any>>

  • get FormValues(): ((props: FormValuesProps<Values>) => ReactElement<any, string | JSXElementConstructor<any>>)
  • Returns ((props: FormValuesProps<Values>) => ReactElement<any, string | JSXElementConstructor<any>>)

      • (props: FormValuesProps<Values>): ReactElement<any, string | JSXElementConstructor<any>>
      • Get all the form values.

        Returns

        Parameters

        Returns ReactElement<any, string | JSXElementConstructor<any>>

Methods

  • Type Parameters

    • Key extends keyof Formeum<Values, Record<never, never>>

    • T

    Parameters

    • name: Key
    • backup: (() => T)
        • (): T
        • Returns T

    Returns T

Generated using TypeDoc