Is it possible to manually update the submitCount from formState? #12583
Unanswered
jonwaldstein
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.
-
Reason being, I want to programmatically validate my form via a post request (think of a dry run before actually submitting). However, some fields are listening for that
submitCount
to re-render themselves viauseEffect
(think captcha field like Turnstile Cloudflare) that can only be validated once.I'm thinking the simplest way would be to figure out how to dispatch an incremental update to that
submitCount
state whenever i'm hitting my validation endpoint. Is this possible?Beta Was this translation helpful? Give feedback.
All reactions