r/reactjs • u/Independent_Side9419 • Oct 19 '26
Discussion I was wrong about the useFormStatus hook
/r/react/comments/1xa4giq/i_was_wrong_about_the_useformstatus_hook/
1
Upvotes
r/reactjs • u/Independent_Side9419 • Oct 19 '26
3
u/poc-detektd Oct 21 '26
Not an antipattern imo, one form per decision maps really well to how the server sees it anyway: two separate submissions with one hidden field each, no onClick logic to keep in sync. I do the same for approve/reject style UIs.
Side note since people will probably copy the consent component from your repo: OAuth consent pages usually ship with
frame-ancestors 'none'(or X-Frame-Options: DENY) so they can’t be framed for clickjacking. Lax session cookies already make it hard, but it’s a cheap header to add in next.config.1
u/Winodows_Gandy Oct 20 '26
curious what your original take was. most of the criticism ive seen is about it being too tightly coupled to server actions, which is fair but also kind of the point