NazCodeland
NazCodeland16mo ago

should we use tRPC for handling form submittion or not?

Hey everyone, I've started using tRPC for my API endpoints and my project is based in Svelte/SvelteKit and in that eco system we have this https://superforms.rocks/ library for handling form data. I am unsure what to choose here
4 Replies
the_riz
the_riz16mo ago
I don't know anything about that library, but taking a quick look at it, it almost seems like it is doing the exact same thing that tRPC does?
NazCodeland
NazCodeland16mo ago
I don't know to much of either library so I can't really say. From my understand so far, superforms library is primary meant to handle form data and not make api endpoints
the_riz
the_riz16mo ago
I only mean they are the same in that both are using zod as a validator for both server and client. The actual client-ui-library part of things doesn't relate to tRPC. So for building forms, no tRPC doesn't do that, but for validating form-data, that is something tRPC would do. (I think)
NazCodeland
NazCodeland16mo ago
ok thanks for the help r-i-c-h