Tanstack Start Integration? #1928
Unanswered
adam-enition
asked this question in
Q&A
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.
-
Is the tanstack start integration actually working for anyone? This could be a skill issue but I'm struggling to get it working as detailed in the docs. I have the exact setup as the tanstack form start example - https://tanstack.com/form/latest/docs/framework/react/examples/tanstack-start
First issue is in the
handleFormcode:e.responseis never returned as e does not appear to be a real instance ofServerValidateErrorwhich I am importing from@tanstack/react-form-startIf I change the above to:
This now works and
e.responseis correctly returned. However this then brings me to the next issues. Even thought I havetransformset onuseForm, the state doesn't seem to be set correctly. So for this:The state should be being merged via the call to
useTransform(baseForm => mergeForm(baseForm, state), [state])but that doesn't seem to be the case. E.g. theagefield is never populated with that from the state. So if I post an age of 3 for example, I'd expect the validation to fail and the form to load with the value of 3. It doesn't, it just goes back to thedefaultValue(0 in the example case).This is the same for the server validation errors. The errorMap on the form state looks to contain the correct errors, however these do not seem to be propagated to the individual fields.
Am I going mad or does this just not work yet?
Beta Was this translation helpful? Give feedback.
All reactions