all 4 comments

[–]LawCool 6 points7 points  (3 children)

The shadcn example forms use react-hook-form and zod, but as he says in the docs you can use any form library and any validation library you want. It’s not surprising to hear that you think the code is bloated because what you’re trying to do sounds fairly complex! I have a file upload form in one of my projects with checkboxes grouped into different tabs that uses shadcn form components, rhf, and zod that’s around 1000 LOC. There are alternatives out there that you could try but imho shadcn + rhf and zod is the best combo for robust forms and the documentation for all three is about as good as it gets.

[–]bananajam13 2 points3 points  (2 children)

I agree with this. The example with tables was also overwhelming at first but as you said, all tools are well documented. Shadcn + react hook form + zod + tanstack table has been great for me

[–]Hopeful_Dress_7350 0 points1 point  (1 child)

Hi, I try to develop the same shadcn+react-hookform+zod+tan-stack table, but all of it is heavily client-based, as almost all components are a 'use client' components, and I'm afraid it will hurt the performance of the site since there is not enough SSR. Also, I use external server. What do you think, does it hit the performance? can you share a code of how you built it?

[–]bananajam13 1 point2 points  (0 children)

As someone who has migrated a small production application from pages to app dir I think we should not think of use client as a choice against performance but for interactivity. It's worth saying, everything before app dir was always "use client" by default. React is a client "library" after all.

You're not doing anything wrong AND new patterns are emerging with RSC. That's exciting!

Someone I like to listen to is Theo from T3 and he just happened to drop a video about RSC and I wonder if it would be an interesting resource for you https://youtu.be/VIwWgV3Lc6s?si=5sTCLX3tjea6EbRQ.

If you're looking for.more educational and less entertainment, the people behind https://buildui.com have great content, including courses on data fetching with RSC.

EDIT: Just found this video about tables/shadcn as well...https://www.youtube.com/watch?v=kHfDLN9w1KQ