github TanStack/form @tanstack/react-form@2.0.0-alpha.3

latest releases: @tanstack/react-form-devtools@1.0.0-alpha.3, @tanstack/vue-form@2.0.0-alpha.3, @tanstack/svelte-form@2.0.0-alpha.3...
pre-release2 hours ago

Major Changes

  • Release the first alpha of TanStack Form v2.

Minor Changes

  • Feature: Specify default options for createFormHook

  • Add default form, field, and form group options to createFormHook.

  • #2426 395d61c - BREAKING: schemaOutputs no longer exists. It is superceded by validatorOutputs. This is only a name change, the schema's result is the same as before

    validatorOutputs now allows a callback validator to specify data that the submit function should know. Schemas do this
    automatically, but now you can do it manually as well:
    run: ({ createOutput }) => createOutput('This is not a validation error and onSubmit can use this')

    The current map is:

    Validator onSubmit: ({ validatorOutputs }) => ...
    Schema Schema's output data
    createOutput(X) X
    Default callback validator undefined
    Validation error N/A, onSubmit doesn't run
  • #2365 f8bbc25 - Feat: Field groups may now omit identity bindings like fields={{ a: 'a' }}

  • #2369 28c693f - Feat: Field and Form components can now be nested to create namespaces.

Patch Changes

  • Refactor: Adapter formOptions/appFormOptions no longer shim the core types and runtime.

    BREAKING: formOptions.looseSchema and formOptions.strictSchema now require a schema as
    first parameter. This locks down inference to get the best type safety out of it vs. the options object alone.

    Fix: formOptions.looseSchema now allows defaultValues to omit properties instead of
    requiring them to be explicitly undefined.

  • Fix: Subscription selectors now infer tuple return values without requiring as const.

  • #2434 fceed8a - Provide the field context inside App Form ArrayField, so registered field components render there instead of throwing.

  • Updated dependencies [584fcd9, a679245, 395d61c, f8bbc25]:

    • @tanstack/form-core@2.0.0-alpha.3

Don't miss a new form release

NewReleases is sending notifications on new releases.