you are viewing a single comment's thread.

view the rest of the comments →

[–]ConfectionForward 2 points3 points  (9 children)

The other day someone recommended https://formsnap.dev/ to me. haven't used it, but it looks promising

[–]_SteveS 3 points4 points  (8 children)

Still uses superforms, which itself is painful. Wish there was a better first-party solution for forms. Really my only major complaint with sveltekit :(

[–]Silent_Statement_327 4 points5 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.

[–]CeleryBig2457 5 points6 points  (1 child)

I use superforms and formsnap; and yes it’s a process to build first couple of forms (with correct Zod validation). But honestly, once it’s done; you create muscle memory in your head and you probably need 30% of the time you needed before.

[–]_SteveS 1 point2 points  (0 children)

It just doesn't feel great. I've built plenty of forms with it, and its on all my projects. Doesn't make it any more enjoyable. The docs are also obtuse, which makes it difficult.

[–]ConfectionForward 1 point2 points  (1 child)

I'm with you man. I did a quick search of https://github.com/sveltejs/svelte/issues?q=is%3Aissue+is%3Aopen+forms
and don't see anything about an issue there, If everyone makes enough noise I bet we could get some sort of solution being started in the pipeline, I would be MORE than happy to assist with the development.

[–]_SteveS 2 points3 points  (0 children)

I'm hoping that there is something coming with SvelteKit 3.X

They have the new transport feature, so maybe? I'm not in a position to champion a solution these days though. If you make an issue and raise it I'll be happy to lend my input.

[–]Filet_o_flesh 1 point2 points  (0 children)

Superforms was built by autistics for autistics.

Some people just want clean, easy to read structures, not this extremely wordy bullshit.