Skip to content
Skip to content
Goodspeed

Connect React Hook Form to your Goodspeed app

Form state management for every generated form: typed useTypedForm hook, server error propagation, and async field validation. Goodspeed wires React Hook Form into every app that needs it at generation time, so you start with a working integration, not a blank config and a documentation tab.

WHAT GETS WIRED IN

Built into every React Hook Form build

Every app Goodspeed generates with React Hook Form includes these wired integrations from the first build. No manual setup required.

ItemDescriptionStrength
useTypedForm<T> in lib/forms.ts wraps useForm with zodV4Resolver pre-wired and onBlur mode for reduced mobile keyboard re-rendersuseTypedForm<T> in lib/forms.ts wraps useForm with zodV4Resolver pre-wired and onBlur mode for reduced mobile keyboard re-renders01
useFormServerError hook reads and sets root.serverError from RHF error state, giving server messages the same display path as client onesuseFormServerError hook reads and sets root.serverError from RHF error state, giving server messages the same display path as client ones02
useAsyncFieldValidator hook debounces async checks (300ms) for fields that need server-side uniqueness validation like usernamesuseAsyncFieldValidator hook debounces async checks (300ms) for fields that need server-side uniqueness validation like usernames03
components/forms/ typed primitives (FormField, FormInput, FormSelect, FormError) wrap RHF controllers with NativeWind stylingcomponents/forms/ typed primitives (FormField, FormInput, FormSelect, FormError) wrap RHF controllers with NativeWind styling04

Source: gas-template repository · form-validation

REAL GENERATED CODE

A snippet from a React Hook Form integration the pipeline ships

This pattern comes directly from the gas-template codebase. The studio generates React Hook Form integration code like this for every app that includes it, not a placeholder you have to fill in yourself.

  1. Typed form hook

    // lib/forms.ts
    export function useTypedForm<T extends FieldValues>(
      schema: z.ZodType<T>,
      options?: Omit<Parameters<typeof useForm<T>>[0], 'resolver'>
    ): UseFormReturn<T> {
      return useForm<T>({
        resolver: zodV4Resolver(schema),
        mode: 'onBlur',
        ...options,
      });
    }
GDaily Allergens

Today's log

Gluten
Tree nuts
Shellfish
Dairy
HomeScanLogProfile

START WITH REACT HOOK FORM

Your React Hook Form integration, generated