What's the usage of lastSubmission parameter in useForm? #353
Unanswered
anderson-chong
asked this question in
Q&A
Replies: 1 comment
-
This is a valid pattern. You should be able to get the transformed value from
There are two main purpose of
However, the parsed value (i.e. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
This is a simplified example, but I have a Zod schema that not only used for validation, but change the key of the object properties after parsing, mainly because the API requires a different set of keys.
Hence, I was wondering what is the consequences of this when it's used by Conform? And I realised the only time Remix's
actionData.submissionwas used (which is the only place that contains the parsedformData) is in thelastSubmissionparameter ofuseForm.But what's the usage of
lastSubmissionparameter? And is there any potential consequences I'm not aware of?Beta Was this translation helpful? Give feedback.
All reactions