Feature Request: form composition for Svelte #1795
Unanswered
Bladesheng
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
React version has this - https://tanstack.com/form/latest/docs/framework/react/guides/form-composition#breaking-big-forms-into-smaller-pieces
I didn't find anything similar in the svelte adapter that would allow me to define the form object in one component, and then pass the form object into another child component, without breaking type inference.
Since this library doesn't really use generics, I'm not sure what would be the best solution.
This is the only workaround I have found so far, though you are creating 2 form objects, which isn't ideal. Also it only works with simple example like this because of #1794.
formOpts.ts
Parent component
ChildComponent.svelte
Beta Was this translation helpful? Give feedback.
All reactions