Closed Zeko369 closed 4 years ago
Wouldn't it better to just use Formik? No need to reinvent the wheel
I've heard that their hooks integration isn't the best, maybe some other form library that works better with hooks?
Or just plain useState/useReducer
@Zeko369 I never used Formik in the React Hooks era, so I can't say much about their hooks integration. There's also React Hook Form which is relatively new and claims to be a far better option, but I don't have any personal experience with it.
That seems quite nice, what do others think? @timmyichen @joelrozen @vaibhavsingh97 @nik-john
react-hook-form seems nice and small. haven't used it before but i'm down to try.
My thought is to go with Formik since it's battle tested + what most people may be familiar with. It also has hooks now if those are needed.
@timmyichen @joelrozen @vaibhavsingh97 @nik-john what say ye?
We have used formik internally on a lot of projects and it's great. I actually took part of my logic for this from our internal stuff and just rewrote to use without formik
We had a vote during our Nov 15 conference call, and there was a consensus that we should try React-hook-form first and if we don't like it, we can switch to Formik.
Have we discussed using
useReducer
instead ofuseState
with an object for this? For this specific form it's OK, but if we had more fields maybeuseReducer
hook would make it more readable, since we're just implementing our own reducer later in thehandleChange
?Originally posted by @Zeko369 in https://github.com/freeCodeCamp/chapter/pull/140