Closed yassinebridi closed 1 year ago
Oh, I haven't heard of react-hook-form, but it looks pretty good! I'll probably use it for some projects coming up :)
However, the only hesitation I have about adding it, is that it will slightly increase the complexity and learning curve of an already decent hefty template without improving the developer experience by too much. Which is a dangerous slippery slope! And since RHF seems pretty easy to set up(from my quick glance at their landing page + your link), it doesn't seem like we'll be saving that much time for developers who would want to use it!
So, I'm leaning toward not having it in the template. Thoughts?
I think having it as an option for the CLI would be super helpful. (Kind of like how T3 works) But since there's no CLI for CUA for now, I agree it can be too much.
Also FWIW, I'm using react-hook-form
and @ts-react/form
with this template and haven't had any issues so far. Works great.
Fantastic! Glad to hear that there's no issue :) Someone's actually made a CLI for CUA! I think it'll get much better with time :)
Just to add on to @chen-rn's point - integrating a form library (whether it be formik
or react-hook-form
) takes a small amount of time (like 10 mins) and can be done quite easily on a project.
Things like Auth, Navigation, UI Components are more fundamental building blocks of a stack and can take a good while to setup. This template addresses the bigger building blocks, rather than trying to be opinionated on every single detail 🙂
I totally agree, the request was more about adding an integral part of every application, not so much about which library to use, but just a way to handle forms in general. And i agree this should be done separately as a form of an option in a CLI as mentioned earlier by @alitnk. I will close this for now.
Currently the template doesn't have a way to deal with forms yet. I was thinking about something like react-hook-form
There is already someone who is integrating it with Tamagui and expo here: https://github.com/dohomi/tamagui-kitchen-sink
I wonder if we can integrate something like this here.