Tanstack Start Integration? #1928
Replies: 2 comments
-
|
Doesn't work for me either; im super confused |
Beta Was this translation helpful? Give feedback.
-
|
I'm facing the same issues. I think after the extraction/migration of start specific login into About the
It then created a temporary patch for me in react-form-state's code, on asking:
About the state not propagating properly with transform: I temporarily created a patch using the changes of #1890, and it seemed to work. It has been a couple or days of figuring it out. All these fixes are specially needed to create progressive enhancement flows with Tanstack, and I hope they get fixed/identified soon. |
Beta Was this translation helpful? Give feedback.
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