Don't reset submit button loading state right before nav - #3345
Open
david-crespo wants to merge 2 commits into
Open
Don't reset submit button loading state right before nav#3345david-crespo wants to merge 2 commits into
david-crespo wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
david-crespo
commented
Aug 21, 2026
| onDismiss={() => { | ||
| setCreateModalOpen(false) | ||
| createNic.reset() // clear stale error state | ||
| }} |
Collaborator
Author
There was a problem hiding this comment.
Lack of reset() here was a bug, uncaught in a previous PR where I tried to fix these missing resets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed while doing #3344. Form submit button loading state is true only when the mutation
isPending. But there's a brief moment after the mutation completes but before the success nav happens where that's false and the button is on screen. What that looks like is the button flipping back to clickable right before the nav. That's stupid, so I gave every button where it makes senseloading={isPending || isSuccess}. There's some risk we could have a form where that is not appropriate (and there are a couple already — seecreateNicon the instance networking tab) but it's very easy for agents to get it right. I added a note to AGENTS.md about it.Before
2026-08-21-project-submit-loading.mp4
After
2026-08-21-project-submit-loading-fixed.mp4