update data via react-hook-form

Hi, I’m trying to create some type of update functionality to my website using forms. Basically the idea is to fetch from the database and offer the user the possibility to change the details of each field as well as adding/removing fields. You can think of a structure similar to a résumé builder. Is react-hook-form the correct technology for that? Or should I consider something else?
6 Replies
Mocha
Mocha2y ago
I just HTML <form> unless I really need to use react-hook-form
matdexir
matdexirOP17mo ago
What would be the use case of react-hook-form for yourself perspective?
Mocha
Mocha17mo ago
I use <form> a lot; never had to use any libraries. But: * if state variables in the form cause too many re-renders, I'd use react-hook-form * if I need validation, I'd use Zod just because I already have it installed with T3 but if you have too many state variables in your form, I'd start by trying to remove them or at least replace them with refs
dollahane23033
dollahane2303317mo ago
I create a separate form component for editing existing data and then pass the data as default values
matdexir
matdexirOP17mo ago
Thanks @100xdev @DollaHane 23033 I really appreciate your input
Want results from more Discord servers?
Add your server