isSubmitting issue in NextJs tanstack Form with demonstration repo
Hello there!
I love tanstack form but the isSubmitting is driving me crazy.
It's such a simple use case still I was able to spend 3h trying to figure out the difference between two repos, one working one not.
https://github.com/ralf-boltshauser/tanstack-form-isSubmitting-issue
I created a demo repo where I showcase the issue, please clone, install and see the demo.
Can anyone tell me why I need to use onBlurAync validator in order to make isSubmitting work???
Of course I could manage isSubmitting myself but that feels wrong. I want to use the tanstack isSubmitting...
GitHub
GitHub - ralf-boltshauser/tanstack-form-isSubmitting-issue
Contribute to ralf-boltshauser/tanstack-form-isSubmitting-issue development by creating an account on GitHub.

2 Replies
fascinating-indigoOP•5mo ago
when using async validator it is working and replacing the button content with ... in the "normal" version it is not working or i found in the console logs that it is turning isSubmitting to true for like 1 render and then to false again so i can't see it ...
please someone help me out here! I would love to hear insights on this, it seems like a critical issue that many users will run into!
graceful-blue•5mo ago
are you passing an onSubmit async callback? because it probably does set isSubmitting for that almost instantaneous code execution
the reason onBlurAsync works is because submitting does the following
* run all field validators
* run all form validators
* run
onSubmit
since all three are synchronous in your example, it‘s basically instant. If you want a more permanent variant, use isSubmitted
I also remember some nextjs talks in the forum / channel chatlogs about transform and submitting, so you should be able to find some other cases