Conform breaks Remix <Form /> submission with clientAction #476
-
Describe the bug and the expected behaviorSubmitting a conform driven Quick comparison:
I've tried hard to make a very minimum reproduction to reveal root cause. I believe the bug is occurring with all of these conditions are met:
Apply one of the following changes workaround the bug:
Conform versionv1.0.2 Steps to Reproduce the Bug or Issue
What browsers are you seeing the problem on?No response Screenshots or VideosScreen.Recording.2024-02-22.at.12.16.31.AM.movAdditional contextRemix with Vite were just marked stable today. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
This is because Conform handle everything including validation as a form submission to achieve single data flow. You should either check the submission status on the client action and just return the result back similar to |
Beta Was this translation helpful? Give feedback.
-
I updated the sample code to reduce noise. This makes validation always be passed. const schema = z.object({
- nickname: z.string(),
+ nickname: z.string().optional(),
}); |
Beta Was this translation helpful? Give feedback.
-
Sorry that I have misread your report and thanks for providing a very detailed description here! Interestingly, I can reproduce your issue on Chrome but not on Firefox. I tend to think this would be an issue on the Remix side but I will try to dig deeper over the weekend and see if I can further narrow down the scope here. There are two things suspicious here:
|
Beta Was this translation helpful? Give feedback.
I have also converted this back to an issue (#516) so I can keep track of it :)