v0.23.0
Version 0.23.0 - 6/20/24, 3:35 AM
Changes
Feat
- add formOptions API, add new exports from
@tanstack/react-form/nextjs
, remove createFormFactory (a9e3852) by Corbin Crutchley
This version changes a fair bit if you are using the following APIs:
formFactory
(React, Vue, Lit, Solid)onServerValidate
(React)
formFactory
If you are using a formFactory
API, please remove it in favor of the new formOptions
function.
// Old
const formFactory = createFormFactory<Person>({
defaultValues: {
firstName: '',
lastName: '',
hobbies: [],
},
})
formFactory.useForm({})
// New
const formOpts = formOptions<Person>({
defaultValues: {
firstName: '',
lastName: '',
hobbies: [],
},
})
useForm(formOpts)
While not a 1:1 API, we believe that any existing usages of
formFactory
are better suited forformOptions
onServerValidate
Instead of using onServerValidate
on a formFactory
, you'll want to follow our new SSR guidance:
https://tanstack.com/form/latest/docs/framework/react/guides/ssr
You can see the diff of the old SSR guide and the new one here:
a9e3852#diff-7589cfcbf048311003c3cdc2e48d40fe17dbb21a88c1070695758e43f8efe898
Packages
- @tanstack/[email protected]
- @tanstack/[email protected]
- @tanstack/[email protected]
- @tanstack/[email protected]
- @tanstack/[email protected]
- @tanstack/[email protected]
- @tanstack/[email protected]
- @tanstack/[email protected]
- @tanstack/[email protected]