Replies: 1 comment
-
Same issue |
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
-
Hello,
I recently started working with conform and one thing I kept hitting is not being able to send JSON to my actions due to the limitation of only working with formData or URLSearchParams. My current use case is saving the value of a rich text editor as JSON.
To do that, I am directly submitting the form with fetcher.submit, and using conform to reset the editor when the request succeeds.
I tried to adopt parseWithZod to JSON following this guide https://www.jacobparis.com/content/conform-json-formdata, but I soon hit the limit as those functions imported are internal to conform. So, I am making a formal request to consider allowing this use-case of submitting JSON to actions.
Thank you!
This is the code I used (I had to dig into conform as I need to be able to reset the form, which the guide does not include):
Beta Was this translation helpful? Give feedback.
All reactions