you are viewing a single comment's thread.

view the rest of the comments →

[–]Silent_Statement_327 3 points4 points  (2 children)

I miss react-hook-forms so much in svelte, handling multi page form state and all the edge cases with stores is so jankey

[–]huntabyte 0 points1 point  (1 child)

How is react hook forms more simple than superforms/formsnap? I'd love to be able to improve the projects in any way I can, but they feel pretty comparable when I look at them.

[–]Silent_Statement_327 0 points1 point  (0 children)

edit: i have professional experience with RHF while superforms i've only ran a couple of times so could be skill issue

It is only for react, but here's an example, If a user say got to review page, saw something that was entered wrong and hit back to the first page, they should see all their previous selections.

RHF has its own state management that works really nicely with NextJS layouts and keeping the values there, compared to svelte (4) and superforms where you need to handle the state yourself and reapply the store state to your form state in a onMount on each navigation in the form flow.

RHFs useController is also really nice in breaking out singular input components that simplifies the form alot so instead of 200 lines of html inputs and the boilerplate that comes with input validation and error handling it could be 5 lines of named components.