Remix useFetcher and Conform producing strange behaviour #792
Unanswered
jashiels99
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Firstly, according to the Conform documentation, I should use
useActionDatato set thelastResultproperty. This doesn't appear to work. The server-side validation isn't being picked up by the hook, even though it is picked up in the Network tab. So I tried this:lastResult: fetcher.state === 'idle' ? fetcher.data : null.This made more sense to me, and the server-side validation errors were now appearing. If I was to submit this form by clicking the submit button, this would all work just fine. However, when the form is submitted by pressing 'Return', it appears I get some sort of race condition (I think??). I have attached a screenshot.
Any help would be much appreciated I've been stuck on this for a while now 🙏
Beta Was this translation helpful? Give feedback.
All reactions