-
Hello. I'm using remix-validated-form on a intranet / feed app and it's been great. On the feed page I have multiple posts (10 loaded with the page load and loading more automatically when the user reaches the bottom). I have used in other pages I'm unsure about how to proceed with this multiple forms page though. The number of forms is dynamic (10 at first and growing as the user reaches the bottom). What should the optimal way to handle this look like? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! If all you're doing is resetting after submit, you can use the More generally about the
Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hi!
If all you're doing is resetting after submit, you can use the
reserAfterSubmit
prop. If you're resetting on a button press, you can use the native<button type="reset" />
instead of the hook.More generally about the
useFormContext
hook, you have a couple options depending on your case.If you use
useFormContext
from a descendant of theValidatedForm
, maybe by pulling your logic into a component, you can omit the form id entirely.You can use a dynamic value for the form id. If you have a list of posts, I'm guessing the post has some sort of id you can use.